From 80e322f8b59e528227728a75aa9465b0a6d5794f Mon Sep 17 00:00:00 2001 From: Ben Huddleston Date: Mon, 21 Jun 2021 20:18:51 +0100 Subject: [PATCH] MB-39745: Make various KVStore functions const Change-Id: I5d072f3981888e34e7dd69f312aa80e47d32825f Reviewed-on: http://review.couchbase.org/c/kv_engine/+/156206 Tested-by: Build Bot Reviewed-by: Dave Rigby --- engines/ep/src/kvstore.cc | 2 +- engines/ep/src/kvstore.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/ep/src/kvstore.cc b/engines/ep/src/kvstore.cc index 8e9db5d884..4b25521ffc 100644 --- a/engines/ep/src/kvstore.cc +++ b/engines/ep/src/kvstore.cc @@ -323,7 +323,7 @@ bool KVStore::snapshotStats(const nlohmann::json& stats) { return rv; } -nlohmann::json KVStore::getPersistedStats() { +nlohmann::json KVStore::getPersistedStats() const { std::string dbname = getConfig().getDBName(); const auto fname = cb::io::sanitizePath(dbname + "/stats.json"); if (!cb::io::isFile(fname)) { diff --git a/engines/ep/src/kvstore.h b/engines/ep/src/kvstore.h index 404a410af2..53ed7a4edb 100644 --- a/engines/ep/src/kvstore.h +++ b/engines/ep/src/kvstore.h @@ -687,7 +687,7 @@ class KVStore { st.reset(); } - size_t getMemFootPrint() { + size_t getMemFootPrint() const { return st.getMemFootPrint(); } @@ -841,7 +841,7 @@ class KVStore { * session is stored. If the function fails and empty nlohmann::json will be * returned */ - nlohmann::json getPersistedStats(); + nlohmann::json getPersistedStats() const; /** * Persist a snapshot of a collection of stats.