diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-01-28 07:24:50 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-01-28 07:24:50 +0000 |
commit | 120e5948c43eb8b30539b9ecc69f3def3bf8fed1 (patch) | |
tree | c756f129cf8c0d9ae23b571bd5c2167dcc1a03e0 /searchlib | |
parent | 55c92b06302ac368fc292f50d066aefc7ab34abc (diff) |
Ignore the current active file when computing spread.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/docstore/logdatastore.cpp | 8 |
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()); } } |