aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/apps/vespa-feed-bm/storage_api_rpc_bm_feed_handler.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-11-25 18:17:27 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-11-26 00:23:06 +0000
commitee2baa1b001a282bd57318a3f0b8881cdcbc3049 (patch)
treee1bd88266adb509a9ce4006f7d68cbc59db3c295 /searchcore/src/apps/vespa-feed-bm/storage_api_rpc_bm_feed_handler.cpp
parente1584673531bc771fa94731da337ce311b4ff7d1 (diff)
As we have have now removed the expensive Route member we can further compact the message objects.
- Compact StorageMessageAddress to 16 bytes by - using reference to cluster name. - Use small enums for protocol and node type. - Avoid having StorageMessage as separate allocation. - Avoid default values
Diffstat (limited to 'searchcore/src/apps/vespa-feed-bm/storage_api_rpc_bm_feed_handler.cpp')
-rw-r--r--searchcore/src/apps/vespa-feed-bm/storage_api_rpc_bm_feed_handler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/searchcore/src/apps/vespa-feed-bm/storage_api_rpc_bm_feed_handler.cpp b/searchcore/src/apps/vespa-feed-bm/storage_api_rpc_bm_feed_handler.cpp
index 55de3e6048f..575cde3fe00 100644
--- a/searchcore/src/apps/vespa-feed-bm/storage_api_rpc_bm_feed_handler.cpp
+++ b/searchcore/src/apps/vespa-feed-bm/storage_api_rpc_bm_feed_handler.cpp
@@ -26,6 +26,10 @@ using storage::lib::NodeType;
namespace feedbm {
+namespace {
+ vespalib::string _Storage("storage");
+}
+
class StorageApiRpcBmFeedHandler::MyMessageDispatcher : public storage::MessageDispatcher,
public StorageReplyErrorChecker
{
@@ -68,7 +72,7 @@ StorageApiRpcBmFeedHandler::StorageApiRpcBmFeedHandler(SharedRpcResources& share
: IBmFeedHandler(),
_name(vespalib::string("StorageApiRpcBmFeedHandler(") + (distributor ? "distributor" : "service-layer") + ")"),
_distributor(distributor),
- _storage_address(std::make_unique<StorageMessageAddress>("storage", distributor ? NodeType::DISTRIBUTOR : NodeType::STORAGE, 0)),
+ _storage_address(std::make_unique<StorageMessageAddress>(&_Storage, distributor ? NodeType::DISTRIBUTOR : NodeType::STORAGE, 0)),
_shared_rpc_resources(shared_rpc_resources_in),
_message_dispatcher(std::make_unique<MyMessageDispatcher>()),
_message_codec_provider(std::make_unique<storage::rpc::MessageCodecProvider>(repo, std::make_shared<documentapi::LoadTypeSet>())),