summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-10-05 15:44:25 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-10-05 15:53:07 +0000
commit0ee2bff2e2d35479a2243834c7f893e8c469573d (patch)
tree5b03367dcc520918a5f0b5e5847e3ba9fb59e243 /searchlib
parent0d149ee8c5d5f1ca50f936defd0e1da280309f25 (diff)
Add test for disabling of cache in removed db
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/docstore/documentstore.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/docstore/documentstore.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/docstore/documentstore.cpp b/searchlib/src/vespa/searchlib/docstore/documentstore.cpp
index 7d585007d76..e41c1846500 100644
--- a/searchlib/src/vespa/searchlib/docstore/documentstore.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/documentstore.cpp
@@ -121,6 +121,10 @@ DocumentStore::Config::operator == (const Config &rhs) const {
(_compression == rhs._compression);
}
+size_t
+DocumentStore::getCacheCapacity() const {
+ return _cache->capacityBytes();
+}
DocumentStore::DocumentStore(const Config & config, IDataStore & store)
: IDocumentStore(),
diff --git a/searchlib/src/vespa/searchlib/docstore/documentstore.h b/searchlib/src/vespa/searchlib/docstore/documentstore.h
index c83d625d908..e323df7de73 100644
--- a/searchlib/src/vespa/searchlib/docstore/documentstore.h
+++ b/searchlib/src/vespa/searchlib/docstore/documentstore.h
@@ -85,6 +85,7 @@ public:
DataStoreStorageStats getStorageStats() const override;
vespalib::MemoryUsage getMemoryUsage() const override;
std::vector<DataStoreFileChunkStats> getFileChunkStats() const override;
+ size_t getCacheCapacity() const;
/**
* Implements common::ICompactableLidSpace