Skip to content

Commit

Permalink
Merge pull request #32838 from vespa-engine/toregge/move-posting-list…
Browse files Browse the repository at this point in the history
…-cache-size-in-proton-def

Move posting list cache size in proton.def
  • Loading branch information
geirst authored Nov 12, 2024
2 parents 6a70c60 + a9d347e commit 351a47b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions configdefinitions/src/vespa/proton.def
Original file line number Diff line number Diff line change
Expand Up @@ -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.
##
Expand Down
4 changes: 2 additions & 2 deletions searchcore/src/vespa/searchcore/proton/server/proton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ void ensureWritableDir(const std::string &dirName) {
std::shared_ptr<IPostingListCache>
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<PostingListCache>(cfg.index.postinglist.cache.maxbytes);
return std::make_shared<PostingListCache>(cfg.index.cache.postinglist.maxbytes);
}

} // namespace <unnamed>
Expand Down

0 comments on commit 351a47b

Please sign in to comment.