diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-03-02 10:03:02 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-03-02 10:03:02 +0000 |
commit | 4858d43f0931d9dfdfb54340b73f735c934dd060 (patch) | |
tree | 38cddab60605e3f7919d0d859ff3dc7cfe29de30 /searchcore | |
parent | c8e1a1e81fb4eccdaa8d5c917356082dc25d279f (diff) |
Sign off that the job is complete by erasing the job token.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/bucketmovejobv2.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/bucketmovejobv2.cpp b/searchcore/src/vespa/searchcore/proton/server/bucketmovejobv2.cpp index 89e8c2d7c79..5be7f5fed0c 100644 --- a/searchcore/src/vespa/searchcore/proton/server/bucketmovejobv2.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/bucketmovejobv2.cpp @@ -53,7 +53,7 @@ blockedDueToClusterState(const std::shared_ptr<IBucketStateCalculator> &calc) return !(clusterUp && nodeUp && !nodeInitializing); } -constexpr BucketId RECOMPUTE_BUCKETID; +constexpr BucketId RECOMPUTE_TOKEN; } @@ -254,10 +254,11 @@ BucketMoveJobV2::handleMoveResult(BucketMoverSP mover) { _bucketsInFlight.erase(bucket); updatePending(); if (_postponedUntilSafe.contains(bucket)) { + _postponedUntilSafe.erase(bucket); reconsiderBucket(_ready.meta_store()->getBucketDB().takeGuard(), bucket); } - if (_bucketsInFlight.empty() && _postponedUntilSafe.contains(RECOMPUTE_BUCKETID)) { - _postponedUntilSafe.erase(RECOMPUTE_BUCKETID); + if (_bucketsInFlight.empty() && _postponedUntilSafe.contains(RECOMPUTE_TOKEN)) { + _postponedUntilSafe.erase(RECOMPUTE_TOKEN); recompute(); } } @@ -419,7 +420,7 @@ BucketMoveJobV2::notifyClusterStateChanged(const std::shared_ptr<IBucketStateCal if (_bucketsInFlight.empty()) { recompute(); } else { - _postponedUntilSafe.insert(RECOMPUTE_BUCKETID); + _postponedUntilSafe.insert(RECOMPUTE_TOKEN); } } } |