summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2021-10-18 11:06:03 +0200
committerTor Egge <Tor.Egge@online.no>2021-10-18 11:16:36 +0200
commit9be31ce64be16514edc81214fd1dc2de5fd7e954 (patch)
tree8fcf4079ae6cdf84f56d51cad8030e2a532654e3 /storage
parent51bb13711c69e074c35159ea70f235d0a25b2119 (diff)
Add guard against lockstep wait in ApplyBucketDiffState::wait().
Add guard against throwing exception out of ApplyBucketDiffState destructor.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/persistence/apply_bucket_diff_state.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/storage/src/vespa/storage/persistence/apply_bucket_diff_state.cpp b/storage/src/vespa/storage/persistence/apply_bucket_diff_state.cpp
index 4fe24895c54..c754796ba51 100644
--- a/storage/src/vespa/storage/persistence/apply_bucket_diff_state.cpp
+++ b/storage/src/vespa/storage/persistence/apply_bucket_diff_state.cpp
@@ -17,7 +17,10 @@ ApplyBucketDiffState::ApplyBucketDiffState(const MergeBucketInfoSyncer& merge_bu
ApplyBucketDiffState::~ApplyBucketDiffState()
{
wait();
- sync_bucket_info();
+ try {
+ sync_bucket_info();
+ } catch (std::exception&) {
+ }
}
bool
@@ -29,6 +32,9 @@ ApplyBucketDiffState::empty() const
void
ApplyBucketDiffState::wait()
{
+ if (!_async_results.empty()) {
+ _async_results.back().wait();
+ }
for (auto &result_to_check : _async_results) {
result_to_check.wait();
}