From a9d347e4bd727a4157e94787d31327ce9f0a9287 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Tue, 12 Nov 2024 13:05:14 +0100 Subject: [PATCH] Move posting list cache size in proton.def --- configdefinitions/src/vespa/proton.def | 5 +++-- searchcore/src/vespa/searchcore/proton/server/proton.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/configdefinitions/src/vespa/proton.def b/configdefinitions/src/vespa/proton.def index 4bc5d6c47c47..3dae73d42603 100644 --- a/configdefinitions/src/vespa/proton.def +++ b/configdefinitions/src/vespa/proton.def @@ -543,9 +543,10 @@ index.cache.size long default=0 restart ## ## Is default turned off (maxbytes == 0). ## The cache will not be used if search.io == MMAP. -## A postive number specifies the max size of the cache in bytes. +## A positive number specifies the max size of the cache in bytes. ## A negative number specifies the max size of the cache as a percentage of total memory. -index.postinglist.cache.maxbytes long default=0 restart +index.cache.postinglist.maxbytes long default=0 restart +index.cache.bitvector.maxbytes long default=0 restart ## Specifies which tensor implementation to use for all backend code. ## diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index 039714b409b7..b2905e55bbd6 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -165,10 +165,10 @@ void ensureWritableDir(const std::string &dirName) { std::shared_ptr make_posting_list_cache(const ProtonConfig& cfg) { - if (cfg.search.io == ProtonConfig::Search::Io::MMAP || cfg.index.postinglist.cache.maxbytes == 0) { + if (cfg.search.io == ProtonConfig::Search::Io::MMAP || cfg.index.cache.postinglist.maxbytes == 0) { return {}; } - return std::make_shared(cfg.index.postinglist.cache.maxbytes); + return std::make_shared(cfg.index.cache.postinglist.maxbytes); } } // namespace