summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2022-09-14 14:17:46 +0000
committerTor Brede Vekterli <vekterli@yahooinc.com>2022-09-15 14:32:01 +0000
commit947b8c17af4ed513ce22615ddd595527985df46a (patch)
treebe1a94d1951727642b53115ebad4473f3372a438 /storage
parentbc8116410ed55cd88eb22020b26a2cf69e43f5c7 (diff)
Add internal content node feature for not implicitly indexing active buckets
Diffstat (limited to 'storage')
-rw-r--r--storage/src/tests/distributor/top_level_bucket_db_updater_test.cpp7
-rw-r--r--storage/src/tests/storageapi/mbusprot/storageprotocoltest.cpp1
-rw-r--r--storage/src/vespa/storage/distributor/node_supported_features.h1
-rw-r--r--storage/src/vespa/storage/distributor/pendingclusterstate.cpp5
-rw-r--r--storage/src/vespa/storageapi/mbusprot/protobuf/maintenance.proto5
-rw-r--r--storage/src/vespa/storageapi/mbusprot/protocolserialization7.cpp6
-rw-r--r--storage/src/vespa/storageapi/message/bucket.h5
7 files changed, 22 insertions, 8 deletions
diff --git a/storage/src/tests/distributor/top_level_bucket_db_updater_test.cpp b/storage/src/tests/distributor/top_level_bucket_db_updater_test.cpp
index 19ec51f4ed4..7b4f688b253 100644
--- a/storage/src/tests/distributor/top_level_bucket_db_updater_test.cpp
+++ b/storage/src/tests/distributor/top_level_bucket_db_updater_test.cpp
@@ -2512,6 +2512,7 @@ TEST_F(TopLevelBucketDBUpdaterTest, node_feature_sets_are_aggregated_from_nodes_
for (uint16_t i : {0, 1, 2}) {
EXPECT_FALSE(s->node_supported_features_repo().node_supported_features(i).unordered_merge_chaining);
EXPECT_FALSE(s->node_supported_features_repo().node_supported_features(i).two_phase_remove_location);
+ EXPECT_FALSE(s->node_supported_features_repo().node_supported_features(i).no_implicit_indexing_of_active_buckets);
}
}
@@ -2524,6 +2525,7 @@ TEST_F(TopLevelBucketDBUpdaterTest, node_feature_sets_are_aggregated_from_nodes_
if (i > 0) {
reply.supported_node_features().unordered_merge_chaining = true;
reply.supported_node_features().two_phase_remove_location = true;
+ reply.supported_node_features().no_implicit_indexing_of_active_buckets = true;
}
}));
}
@@ -2532,10 +2534,15 @@ TEST_F(TopLevelBucketDBUpdaterTest, node_feature_sets_are_aggregated_from_nodes_
for (auto* s : stripes) {
EXPECT_FALSE(s->node_supported_features_repo().node_supported_features(0).unordered_merge_chaining);
EXPECT_FALSE(s->node_supported_features_repo().node_supported_features(0).two_phase_remove_location);
+ EXPECT_FALSE(s->node_supported_features_repo().node_supported_features(0).no_implicit_indexing_of_active_buckets);
+
EXPECT_TRUE(s->node_supported_features_repo().node_supported_features(1).unordered_merge_chaining);
EXPECT_TRUE(s->node_supported_features_repo().node_supported_features(1).two_phase_remove_location);
+ EXPECT_TRUE(s->node_supported_features_repo().node_supported_features(1).no_implicit_indexing_of_active_buckets);
+
EXPECT_TRUE(s->node_supported_features_repo().node_supported_features(2).unordered_merge_chaining);
EXPECT_TRUE(s->node_supported_features_repo().node_supported_features(2).two_phase_remove_location);
+ EXPECT_TRUE(s->node_supported_features_repo().node_supported_features(2).no_implicit_indexing_of_active_buckets);
}
}
diff --git a/storage/src/tests/storageapi/mbusprot/storageprotocoltest.cpp b/storage/src/tests/storageapi/mbusprot/storageprotocoltest.cpp
index 5ed2e0d96b4..344c909c13e 100644
--- a/storage/src/tests/storageapi/mbusprot/storageprotocoltest.cpp
+++ b/storage/src/tests/storageapi/mbusprot/storageprotocoltest.cpp
@@ -389,6 +389,7 @@ TEST_P(StorageProtocolTest, request_bucket_info) {
EXPECT_TRUE(reply2->supported_node_features().unordered_merge_chaining);
EXPECT_TRUE(reply2->supported_node_features().two_phase_remove_location);
+ EXPECT_TRUE(reply2->supported_node_features().no_implicit_indexing_of_active_buckets);
}
}
diff --git a/storage/src/vespa/storage/distributor/node_supported_features.h b/storage/src/vespa/storage/distributor/node_supported_features.h
index 87b2a9aef8e..bbd17403a6d 100644
--- a/storage/src/vespa/storage/distributor/node_supported_features.h
+++ b/storage/src/vespa/storage/distributor/node_supported_features.h
@@ -13,6 +13,7 @@ namespace storage::distributor {
struct NodeSupportedFeatures {
bool unordered_merge_chaining = false;
bool two_phase_remove_location = false;
+ bool no_implicit_indexing_of_active_buckets = false;
bool operator==(const NodeSupportedFeatures& rhs) const noexcept = default;
};
diff --git a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp
index dadbda60021..cf32d21eb82 100644
--- a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp
+++ b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp
@@ -340,8 +340,9 @@ PendingClusterState::update_node_supported_features_from_reply(uint16_t node, co
{
const auto& src_feat = reply.supported_node_features();
NodeSupportedFeatures dest_feat;
- dest_feat.unordered_merge_chaining = src_feat.unordered_merge_chaining;
- dest_feat.two_phase_remove_location = src_feat.two_phase_remove_location;
+ dest_feat.unordered_merge_chaining = src_feat.unordered_merge_chaining;
+ dest_feat.two_phase_remove_location = src_feat.two_phase_remove_location;
+ dest_feat.no_implicit_indexing_of_active_buckets = src_feat.no_implicit_indexing_of_active_buckets;
// This will overwrite per bucket-space reply, but does not matter since it's independent of bucket space.
_node_features.insert(std::make_pair(node, dest_feat));
}
diff --git a/storage/src/vespa/storageapi/mbusprot/protobuf/maintenance.proto b/storage/src/vespa/storageapi/mbusprot/protobuf/maintenance.proto
index a79ac9fd99a..0c1df005a5a 100644
--- a/storage/src/vespa/storageapi/mbusprot/protobuf/maintenance.proto
+++ b/storage/src/vespa/storageapi/mbusprot/protobuf/maintenance.proto
@@ -110,8 +110,9 @@ message BucketAndBucketInfo {
}
message SupportedNodeFeatures {
- bool unordered_merge_chaining = 1;
- bool two_phase_remove_location = 2;
+ bool unordered_merge_chaining = 1;
+ bool two_phase_remove_location = 2;
+ bool no_implicit_indexing_of_active_buckets = 3;
}
message RequestBucketInfoResponse {
diff --git a/storage/src/vespa/storageapi/mbusprot/protocolserialization7.cpp b/storage/src/vespa/storageapi/mbusprot/protocolserialization7.cpp
index 662408c4e95..151facf36e6 100644
--- a/storage/src/vespa/storageapi/mbusprot/protocolserialization7.cpp
+++ b/storage/src/vespa/storageapi/mbusprot/protocolserialization7.cpp
@@ -1058,6 +1058,7 @@ void ProtocolSerialization7::onEncode(GBBuf& buf, const api::RequestBucketInfoRe
if (msg.full_bucket_fetch()) {
res.mutable_supported_node_features()->set_unordered_merge_chaining(true);
res.mutable_supported_node_features()->set_two_phase_remove_location(true);
+ res.mutable_supported_node_features()->set_no_implicit_indexing_of_active_buckets(true);
}
});
}
@@ -1098,8 +1099,9 @@ api::StorageReply::UP ProtocolSerialization7::onDecodeRequestBucketInfoReply(con
if (res.has_supported_node_features()) {
const auto& src_features = res.supported_node_features();
auto& dest_features = reply->supported_node_features();
- dest_features.unordered_merge_chaining = src_features.unordered_merge_chaining();
- dest_features.two_phase_remove_location = src_features.two_phase_remove_location();
+ dest_features.unordered_merge_chaining = src_features.unordered_merge_chaining();
+ dest_features.two_phase_remove_location = src_features.two_phase_remove_location();
+ dest_features.no_implicit_indexing_of_active_buckets = src_features.no_implicit_indexing_of_active_buckets();
}
return reply;
});
diff --git a/storage/src/vespa/storageapi/message/bucket.h b/storage/src/vespa/storageapi/message/bucket.h
index d9843236d2e..ab61a9202c8 100644
--- a/storage/src/vespa/storageapi/message/bucket.h
+++ b/storage/src/vespa/storageapi/message/bucket.h
@@ -393,8 +393,9 @@ public:
friend std::ostream& operator<<(std::ostream& os, const Entry&);
};
struct SupportedNodeFeatures {
- bool unordered_merge_chaining = false;
- bool two_phase_remove_location = false;
+ bool unordered_merge_chaining = false;
+ bool two_phase_remove_location = false;
+ bool no_implicit_indexing_of_active_buckets = false;
};
using EntryVector = vespalib::Array<Entry>;
private: