summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-01-28 07:24:50 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-01-28 07:24:50 +0000
commit120e5948c43eb8b30539b9ecc69f3def3bf8fed1 (patch)
treec756f129cf8c0d9ae23b571bd5c2167dcc1a03e0 /searchlib
parent55c92b06302ac368fc292f50d066aefc7ab34abc (diff)
Ignore the current active file when computing spread.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/docstore/logdatastore.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
index 3af7338d73a..36768f36036 100644
--- a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
@@ -335,9 +335,11 @@ LogDataStore::getMaxBucketSpread() const
{
double maxSpread(1.0);
MonitorGuard guard(_updateLock);
- for (const auto & fc : _fileChunks) {
- if (fc) {
- if (_bucketizer && fc->frozen()) {
+ for (FileId i(0); i < FileId(_fileChunks.size()); i = i.next()) {
+ /// Ignore the the active file
+ if (i != _active) {
+ const auto & fc = _fileChunks[i.getId()];
+ if (fc && _bucketizer && fc->frozen()) {
maxSpread = std::max(maxSpread, fc->getBucketSpread());
}
}