diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-05-06 13:23:31 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-05-06 13:23:31 +0000 |
commit | c3585a6c1cccd533d2305491d0d85959dc4e3033 (patch) | |
tree | a11aca5ce2b8754ff893d1998647dd37f2de1076 /storage | |
parent | 7e46fe3d6a80ad5b125031d03ed878b05e49fec0 (diff) |
Remove assert for a scenario that might occur in wait_until_unparked().
A stripe thread is parked as part of another thread calling DistributorStripePool::park_all_threads().
The stripe thread will then be inside DistributorStripePool::park_thread_until_released(),
just waiting to call DistributorStripeThread::wait_until_unparked().
Before this is called, the other thread can call DistributorStripePool::unpark_all_threads(),
and the _should_park variable in DistributorStripeThread is set to false again.
When the stripe thread calls DistributorStripeThread::wait_until_unparked(), it is already unparked.
This is a scenario that might occur when the parking / unparking loop is short.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor_stripe_thread.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/storage/src/vespa/storage/distributor/distributor_stripe_thread.cpp b/storage/src/vespa/storage/distributor/distributor_stripe_thread.cpp index 7359fbe5cf8..372736b8d7d 100644 --- a/storage/src/vespa/storage/distributor/distributor_stripe_thread.cpp +++ b/storage/src/vespa/storage/distributor/distributor_stripe_thread.cpp @@ -70,7 +70,6 @@ void DistributorStripeThread::wait_until_event_notified_or_timed_out() noexcept void DistributorStripeThread::wait_until_unparked() noexcept { std::unique_lock lock(_mutex); - assert(should_park_relaxed()); // _should_park is always written within _mutex, relaxed load is safe. _park_cond.wait(lock, [this]{ return !should_park_relaxed(); }); } |