diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-10-05 18:01:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 18:01:54 +0200 |
commit | 1ddfd644fb6f0d1e67feca079a0b21284e12aff1 (patch) | |
tree | 8a0ac1831bab37537426e4da27dd717e00f5a4ca /searchlib | |
parent | 35c67b733a8a8ad461b1b75795f0b306c8afa837 (diff) | |
parent | 0ee2bff2e2d35479a2243834c7f893e8c469573d (diff) |
Merge pull request #28801 from vespa-engine/balder/disable-cache-for-removed-subdb
Disable cache for removed only docsubdb.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/docstore/documentstore.cpp | 4 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/docstore/documentstore.h | 2 |
2 files changed, 6 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 bb62b09123f..e323df7de73 100644 --- a/searchlib/src/vespa/searchlib/docstore/documentstore.h +++ b/searchlib/src/vespa/searchlib/docstore/documentstore.h @@ -37,6 +37,7 @@ public: { } CompressionConfig getCompression() const { return _compression; } size_t getMaxCacheBytes() const { return _maxCacheBytes; } + Config & disableCache() { _maxCacheBytes = 0; return *this; } Config & updateStrategy(UpdateStrategy strategy) { _updateStrategy = strategy; return *this; } UpdateStrategy updateStrategy() const { return _updateStrategy; } bool operator == (const Config &) const; @@ -84,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 |