aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-01-24 20:43:46 +0100
committerGitHub <noreply@github.com>2022-01-24 20:43:46 +0100
commit7c57db8215a3a08595c4fa8cf3e0bc8dcb3405f9 (patch)
tree317c9ada5c73c35daa669f4048457126f1a7ac16
parent62e458894e905f7de6f85dd8982d8036d741763b (diff)
parent6f2271d971d428aad93bfa9dec3fe291c2d61249 (diff)
Merge pull request #20917 from vespa-engine/toregge/disallow-pending-ops-in-operation-throttler-at-destructionv7.533.16
Don't allow pending ops in DynamicOperationThrottler when destroying instance.
-rw-r--r--vespalib/src/vespa/vespalib/util/shared_operation_throttler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/util/shared_operation_throttler.cpp b/vespalib/src/vespa/vespalib/util/shared_operation_throttler.cpp
index e91be68a671..dd790bcaa0a 100644
--- a/vespalib/src/vespa/vespalib/util/shared_operation_throttler.cpp
+++ b/vespalib/src/vespa/vespalib/util/shared_operation_throttler.cpp
@@ -244,7 +244,10 @@ DynamicOperationThrottler::DynamicOperationThrottler(const DynamicThrottleParams
{
}
-DynamicOperationThrottler::~DynamicOperationThrottler() = default;
+DynamicOperationThrottler::~DynamicOperationThrottler()
+{
+ assert(_pending_ops == 0u);
+}
bool
DynamicOperationThrottler::has_spare_capacity_in_active_window() noexcept