summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2023-06-05 11:46:21 +0000
committerTor Brede Vekterli <vekterli@yahooinc.com>2023-06-05 11:46:21 +0000
commita00278879397db33d6e9593fb887d041bbc44867 (patch)
tree87c720d344405fc2bd760cb106b874fd7dced9dc /storage
parent12ad5de35e58497abb8940940499a13a2ca97d6f (diff)
Explicitly assert that task executor posting was not rejected
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
index 45e991f9ebc..3b97ff6c018 100644
--- a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
+++ b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp
@@ -320,7 +320,9 @@ ChangedBucketOwnershipHandler::onSetSystemState(
// Dispatch to background worker. This indirection is because operations such as lid-space compaction
// may cause the implicit operation abort waiting step to block the caller for a relatively long time.
// It is very important that the executor only has 1 thread, which means this has FIFO behavior.
- _state_sync_executor.execute(std::make_unique<ClusterStateSyncAndApplyTask>(*this, stateCmd));
+ [[maybe_unused]] auto rejected_task = _state_sync_executor.execute(std::make_unique<ClusterStateSyncAndApplyTask>(*this, stateCmd));
+ // If this fails, we have processed a message _after_ onClose has been called, which should not happen.
+ assert(!rejected_task);
return true;
}