database: Expose current memory view update backlog

Expose the base replica's current memory view update backlog, which is
defined in terms of units consumed from the semaphore.

Signed-off-by: Duarte Nunes <duarte@scylladb.com>
This commit is contained in:
Duarte Nunes
2018-10-12 11:49:32 +01:00
parent d54ac4961d
commit 2174eed640

View File

@@ -77,6 +77,7 @@
#include <seastar/core/metrics_registration.hh>
#include "tracing/trace_state.hh"
#include "db/view/view.hh"
#include "db/view/view_update_backlog.hh"
#include "db/view/row_locking.hh"
#include "lister.hh"
#include "utils/phased_barrier.hh"
@@ -1450,6 +1451,10 @@ public:
return _querier_cache;
}
db::view::update_backlog get_view_update_backlog() const {
return {max_memory_pending_view_updates() - _view_update_concurrency_sem.current(), max_memory_pending_view_updates()};
}
friend class distributed_loader;
};