diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2021-11-09 16:33:49 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2021-11-12 15:13:06 +0000 |
commit | 88aef2427e135c269c39b99cd3a7de7351b2608c (patch) | |
tree | 17dc338f9190f07171961079719bf63f81a42710 /storage/src/tests/distributor/top_level_distributor_test_util.cpp | |
parent | 510580d2620b8f5e0b700aa0ee818961cf61fb60 (diff) |
Add configurable support for unordered merge forwarding
Historically the MergeThrottler component has required a deterministic
forwarding of merges between nodes in strictly increasing distribution
key order. This is to avoid distributed deadlocks caused by ending up
with two or more nodes waiting for each other to release merge resources,
where releasing one depends on releasing the other. This works well,
but has the downside that there's an inherent pressure of merges towards
nodes with lower distribution keys. These often become a bottleneck.
This commit lifts this ordering restriction, by allowing forwarded,
unordered merges to immediately enter the active merge window. By doing
this we remove the deadlock potential, since nodes will longer be waiting
on resources freed by other nodes.
Since the legacy MergeThrottler has a lot of invariant checking around
strictly increasing merge chains, we only allow unordered merges to be
scheduled towards node sets where _all_ nodes are on a Vespa version
that explicitly understands unordered merges (and thus do not self-
obliterate upon seeing one). To communicate this, full bucket fetches
will now piggy-back version-specific feature sets as part of the response
protocol. Distributors then aggregate this information internally.
Diffstat (limited to 'storage/src/tests/distributor/top_level_distributor_test_util.cpp')
-rw-r--r-- | storage/src/tests/distributor/top_level_distributor_test_util.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/src/tests/distributor/top_level_distributor_test_util.cpp b/storage/src/tests/distributor/top_level_distributor_test_util.cpp index 636a09d1f6e..2a61141865a 100644 --- a/storage/src/tests/distributor/top_level_distributor_test_util.cpp +++ b/storage/src/tests/distributor/top_level_distributor_test_util.cpp @@ -115,13 +115,13 @@ TopLevelDistributorTestUtil::handle_top_level_message(const std::shared_ptr<api: void TopLevelDistributorTestUtil::close() { - _component.reset(0); - if (_distributor.get()) { + _component.reset(); + if (_distributor) { _stripe_pool->stop_and_join(); // Must be tagged as stopped prior to onClose _distributor->onClose(); } _sender.clear(); - _node.reset(0); + _node.reset(); _config = getStandardConfig(false); } |