summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2017-11-03 15:07:46 +0000
committerGeir Storli <geirst@oath.com>2017-11-03 15:07:46 +0000
commit9382278359d08ebaf29ac82baddfa26b26440d38 (patch)
treefb9fb66282d9070a37648680a2bbf7c05d014846 /storage
parent19181418162c405a444cff4115a49be4cbd5b7b6 (diff)
Replace code path that cannot happen with assertion.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/bucketdb/bucketmanager.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/storage/src/vespa/storage/bucketdb/bucketmanager.cpp b/storage/src/vespa/storage/bucketdb/bucketmanager.cpp
index 5d4fd07c75e..5a0aaedea22 100644
--- a/storage/src/vespa/storage/bucketdb/bucketmanager.cpp
+++ b/storage/src/vespa/storage/bucketdb/bucketmanager.cpp
@@ -259,19 +259,6 @@ void BucketManager::updateMinUsedBits()
}
}
-namespace {
-
-void copyBucketInfoMap(const BucketManager::BucketInfoMap &src,
- BucketManager::BucketInfoMap &dst)
-{
- for (const auto &srcElem : src) {
- auto &dstList = dst[srcElem.first];
- dstList.insert(dstList.end(), srcElem.second.begin(), srcElem.second.end());
- }
-}
-
-}
-
// Responsible for sending on messages that was previously queued
void BucketManager::run(framework::ThreadHandle& thread)
{
@@ -291,9 +278,8 @@ void BucketManager::run(framework::ThreadHandle& thread)
{
vespalib::MonitorGuard monitor(_workerMonitor);
- if (!infoReqs.empty()) {
- copyBucketInfoMap(_bucketInfoRequests, infoReqs);
- _bucketInfoRequests.swap(infoReqs);
+ for (const auto &req : infoReqs) {
+ assert(req.second.empty());
}
if (!didWork) {
monitor.wait(1000);