summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2020-10-02 12:40:10 +0000
committerGeir Storli <geirst@verizonmedia.com>2020-10-02 13:00:53 +0000
commit9f41290e7d90b7f100c6c7bed478873ee73924ef (patch)
treeca69d4f53369e12be3402bd3c155b40cd1d55702 /searchcore
parent188521786cb0d181acf31122ba3803572f86c322 (diff)
Add support for multiple RPC targets per node when using Storage API over RPC.
This should allow for better parallelization and higher feed throughput. The bucket id associated with a message is used to select the RPC target. This ensures the same RPC target is used for all messages to the same bucket to the same node, and the RPC target itself handles sequencing of these messages.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/apps/vespa-feed-bm/bm_cluster_controller.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/searchcore/src/apps/vespa-feed-bm/bm_cluster_controller.cpp b/searchcore/src/apps/vespa-feed-bm/bm_cluster_controller.cpp
index 324f98625f3..15fbb2e2344 100644
--- a/searchcore/src/apps/vespa-feed-bm/bm_cluster_controller.cpp
+++ b/searchcore/src/apps/vespa-feed-bm/bm_cluster_controller.cpp
@@ -44,9 +44,11 @@ BmClusterController::set_cluster_up(bool distributor)
{
StorageMessageAddress storage_address("storage", distributor ? NodeType::DISTRIBUTOR : NodeType::STORAGE, 0);
auto req = make_set_cluster_state_request();
- auto target_resolver = std::make_unique<storage::rpc::CachingRpcTargetResolver>(_shared_rpc_resources.slobrok_mirror(), _shared_rpc_resources.target_factory());
- auto target = target_resolver->resolve_rpc_target(storage_address);
- target->_target->get()->InvokeSync(req, 10.0); // 10 seconds timeout
+ auto target_resolver = std::make_unique<storage::rpc::CachingRpcTargetResolver>(_shared_rpc_resources.slobrok_mirror(),
+ _shared_rpc_resources.target_factory(), 1);
+ uint64_t fake_bucket_id = 0;
+ auto target = target_resolver->resolve_rpc_target(storage_address, fake_bucket_id);
+ target->get()->InvokeSync(req, 10.0); // 10 seconds timeout
assert(!req->IsError());
req->SubRef();
}