diff --git a/docker/.env b/docker/.env index 43ff9d7..26e284a 100644 --- a/docker/.env +++ b/docker/.env @@ -1 +1 @@ -AVS_IMAGE=aerospike/aerospike-vector-search:0.11.1 \ No newline at end of file +AVS_IMAGE=aerospike/aerospike-vector-search:1.0.0 \ No newline at end of file diff --git a/integration_single_node_test.go b/integration_single_node_test.go index 1e5f844..7a501d3 100644 --- a/integration_single_node_test.go +++ b/integration_single_node_test.go @@ -489,6 +489,7 @@ func (suite *SingleNodeTestSuite) TestIndexUpdate() { MaxEntries: ptr(uint64(10_007)), Expiry: ptr(int64(10_008)), }, + EnableVectorIntegrityCheck: ptr(true), }, }, }, @@ -1326,11 +1327,17 @@ func (suite *SingleNodeTestSuite) TestAbout() { nodeId *protos.NodeId expectedVersion string expectedErrMsg *string + expectedRoles []protos.NodeRole }{ { name: "nil-node", nodeId: nil, - expectedVersion: "0.11.1", + expectedVersion: "1.0.0", + // by default the node has all roles + expectedRoles: []protos.NodeRole{ + protos.NodeRole_INDEX_QUERY, + protos.NodeRole_INDEX_UPDATE, + }, }, { name: "node id DNE", @@ -1344,7 +1351,7 @@ func (suite *SingleNodeTestSuite) TestAbout() { for _, tc := range testCases { suite.T().Run(tc.name, func(t *testing.T) { ctx := context.Background() - actualVersion, err := suite.AvsClient.About(ctx, tc.nodeId) + aboutRes, err := suite.AvsClient.About(ctx, tc.nodeId) if tc.expectedErrMsg != nil { suite.Error(err) @@ -1354,7 +1361,8 @@ func (suite *SingleNodeTestSuite) TestAbout() { suite.NoError(err) } - suite.Equal(actualVersion.GetVersion(), tc.expectedVersion) + suite.Equal(tc.expectedVersion, aboutRes.GetVersion()) + suite.Equal(tc.expectedRoles, aboutRes.GetRoles()) }) } } diff --git a/protos/vector-db.pb.go b/protos/vector-db.pb.go index 329d30a..0d99f20 100644 --- a/protos/vector-db.pb.go +++ b/protos/vector-db.pb.go @@ -21,6 +21,60 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Node roles determine the tasks a node will undertake. +type NodeRole int32 + +const ( + // Node will handle ANN query related tasks. + NodeRole_INDEX_QUERY NodeRole = 0 + // Node will handle vector index update/maintenance tasks including + // index, insert, delete and update of vector records and index healing. + NodeRole_INDEX_UPDATE NodeRole = 1 + // Node will handle key value read operations. + NodeRole_KV_READ NodeRole = 2 +) + +// Enum value maps for NodeRole. +var ( + NodeRole_name = map[int32]string{ + 0: "INDEX_QUERY", + 1: "INDEX_UPDATE", + 2: "KV_READ", + } + NodeRole_value = map[string]int32{ + "INDEX_QUERY": 0, + "INDEX_UPDATE": 1, + "KV_READ": 2, + } +) + +func (x NodeRole) Enum() *NodeRole { + p := new(NodeRole) + *p = x + return p +} + +func (x NodeRole) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NodeRole) Descriptor() protoreflect.EnumDescriptor { + return file_vector_db_proto_enumTypes[0].Descriptor() +} + +func (NodeRole) Type() protoreflect.EnumType { + return &file_vector_db_proto_enumTypes[0] +} + +func (x NodeRole) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NodeRole.Descriptor instead. +func (NodeRole) EnumDescriptor() ([]byte, []int) { + return file_vector_db_proto_rawDescGZIP(), []int{0} +} + // The about request message. type AboutRequest struct { state protoimpl.MessageState @@ -66,6 +120,8 @@ type AboutResponse struct { // AVS server version. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Assigned node roles. + Roles []NodeRole `protobuf:"varint,2,rep,packed,name=roles,proto3,enum=aerospike.vector.NodeRole" json:"roles,omitempty"` } func (x *AboutResponse) Reset() { @@ -105,6 +161,13 @@ func (x *AboutResponse) GetVersion() string { return "" } +func (x *AboutResponse) GetRoles() []NodeRole { + if x != nil { + return x.Roles + } + return nil +} + // Cluster Id type ClusterId struct { state protoimpl.MessageState @@ -476,85 +539,92 @@ var file_vector_db_proto_rawDesc = []byte{ 0x74, 0x6f, 0x72, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0e, 0x0a, 0x0c, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x29, 0x0a, 0x0d, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x22, 0x5b, 0x0a, 0x0d, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x1b, 0x0a, 0x09, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x06, 0x4e, 0x6f, 0x64, 0x65, - 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x54, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, - 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x54, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x69, 0x73, 0x54, 0x6c, 0x73, 0x22, 0x54, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, - 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, + 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x05, 0x72, + 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x61, 0x65, 0x72, + 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x1b, 0x0a, + 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x06, 0x4e, 0x6f, + 0x64, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x54, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x54, 0x6c, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x54, 0x6c, 0x73, 0x22, 0x54, 0x0a, 0x12, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x3e, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x22, 0xcf, 0x01, 0x0a, 0x14, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x53, 0x0a, 0x09, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x61, + 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0x62, + 0x0a, 0x0e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0xcf, - 0x01, 0x0a, 0x14, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x6e, - 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x53, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x61, 0x65, 0x72, - 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0x62, 0x0a, 0x0e, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x57, 0x0a, 0x1b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x27, 0x0a, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x0f, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, - 0x39, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x52, - 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x65, - 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4e, - 0x6f, 0x64, 0x65, 0x49, 0x64, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x32, 0x58, - 0x0a, 0x0c, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, - 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1e, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, - 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, - 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0xdf, 0x02, 0x0a, 0x12, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x3f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, - 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x00, - 0x12, 0x45, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, - 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x49, 0x64, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x21, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, - 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x13, 0x47, 0x65, - 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x2d, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x26, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x00, 0x42, 0x43, 0x0a, 0x21, 0x63, 0x6f, - 0x6d, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x1c, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x57, 0x0a, 0x1b, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, + 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x27, 0x0a, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x0f, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x49, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x12, 0x39, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, + 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, + 0x64, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x32, 0x0a, 0x07, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x2a, 0x3a, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0f, 0x0a, 0x0b, + 0x49, 0x4e, 0x44, 0x45, 0x58, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, + 0x0b, 0x0a, 0x07, 0x4b, 0x56, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x02, 0x32, 0x58, 0x0a, 0x0c, + 0x41, 0x62, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x03, + 0x47, 0x65, 0x74, 0x12, 0x1e, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0xdf, 0x02, 0x0a, 0x12, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3f, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x00, 0x12, 0x45, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, + 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x49, 0x64, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x21, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, + 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x69, 0x6e, + 0x67, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, + 0x2d, 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x2e, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x00, 0x42, 0x43, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, + 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x1c, 0x61, 0x65, 0x72, 0x6f, 0x73, 0x70, 0x69, 0x6b, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -569,41 +639,44 @@ func file_vector_db_proto_rawDescGZIP() []byte { return file_vector_db_proto_rawDescData } +var file_vector_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_vector_db_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_vector_db_proto_goTypes = []any{ - (*AboutRequest)(nil), // 0: aerospike.vector.AboutRequest - (*AboutResponse)(nil), // 1: aerospike.vector.AboutResponse - (*ClusterId)(nil), // 2: aerospike.vector.ClusterId - (*NodeId)(nil), // 3: aerospike.vector.NodeId - (*ServerEndpoint)(nil), // 4: aerospike.vector.ServerEndpoint - (*ServerEndpointList)(nil), // 5: aerospike.vector.ServerEndpointList - (*ClusterNodeEndpoints)(nil), // 6: aerospike.vector.ClusterNodeEndpoints - (*ClusterNodeEndpointsRequest)(nil), // 7: aerospike.vector.ClusterNodeEndpointsRequest - (*ClusteringState)(nil), // 8: aerospike.vector.ClusteringState - nil, // 9: aerospike.vector.ClusterNodeEndpoints.EndpointsEntry - (*emptypb.Empty)(nil), // 10: google.protobuf.Empty + (NodeRole)(0), // 0: aerospike.vector.NodeRole + (*AboutRequest)(nil), // 1: aerospike.vector.AboutRequest + (*AboutResponse)(nil), // 2: aerospike.vector.AboutResponse + (*ClusterId)(nil), // 3: aerospike.vector.ClusterId + (*NodeId)(nil), // 4: aerospike.vector.NodeId + (*ServerEndpoint)(nil), // 5: aerospike.vector.ServerEndpoint + (*ServerEndpointList)(nil), // 6: aerospike.vector.ServerEndpointList + (*ClusterNodeEndpoints)(nil), // 7: aerospike.vector.ClusterNodeEndpoints + (*ClusterNodeEndpointsRequest)(nil), // 8: aerospike.vector.ClusterNodeEndpointsRequest + (*ClusteringState)(nil), // 9: aerospike.vector.ClusteringState + nil, // 10: aerospike.vector.ClusterNodeEndpoints.EndpointsEntry + (*emptypb.Empty)(nil), // 11: google.protobuf.Empty } var file_vector_db_proto_depIdxs = []int32{ - 4, // 0: aerospike.vector.ServerEndpointList.endpoints:type_name -> aerospike.vector.ServerEndpoint - 9, // 1: aerospike.vector.ClusterNodeEndpoints.endpoints:type_name -> aerospike.vector.ClusterNodeEndpoints.EndpointsEntry - 2, // 2: aerospike.vector.ClusteringState.clusterId:type_name -> aerospike.vector.ClusterId - 3, // 3: aerospike.vector.ClusteringState.members:type_name -> aerospike.vector.NodeId - 5, // 4: aerospike.vector.ClusterNodeEndpoints.EndpointsEntry.value:type_name -> aerospike.vector.ServerEndpointList - 0, // 5: aerospike.vector.AboutService.Get:input_type -> aerospike.vector.AboutRequest - 10, // 6: aerospike.vector.ClusterInfoService.GetNodeId:input_type -> google.protobuf.Empty - 10, // 7: aerospike.vector.ClusterInfoService.GetClusterId:input_type -> google.protobuf.Empty - 10, // 8: aerospike.vector.ClusterInfoService.GetClusteringState:input_type -> google.protobuf.Empty - 7, // 9: aerospike.vector.ClusterInfoService.GetClusterEndpoints:input_type -> aerospike.vector.ClusterNodeEndpointsRequest - 1, // 10: aerospike.vector.AboutService.Get:output_type -> aerospike.vector.AboutResponse - 3, // 11: aerospike.vector.ClusterInfoService.GetNodeId:output_type -> aerospike.vector.NodeId - 2, // 12: aerospike.vector.ClusterInfoService.GetClusterId:output_type -> aerospike.vector.ClusterId - 8, // 13: aerospike.vector.ClusterInfoService.GetClusteringState:output_type -> aerospike.vector.ClusteringState - 6, // 14: aerospike.vector.ClusterInfoService.GetClusterEndpoints:output_type -> aerospike.vector.ClusterNodeEndpoints - 10, // [10:15] is the sub-list for method output_type - 5, // [5:10] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 0, // 0: aerospike.vector.AboutResponse.roles:type_name -> aerospike.vector.NodeRole + 5, // 1: aerospike.vector.ServerEndpointList.endpoints:type_name -> aerospike.vector.ServerEndpoint + 10, // 2: aerospike.vector.ClusterNodeEndpoints.endpoints:type_name -> aerospike.vector.ClusterNodeEndpoints.EndpointsEntry + 3, // 3: aerospike.vector.ClusteringState.clusterId:type_name -> aerospike.vector.ClusterId + 4, // 4: aerospike.vector.ClusteringState.members:type_name -> aerospike.vector.NodeId + 6, // 5: aerospike.vector.ClusterNodeEndpoints.EndpointsEntry.value:type_name -> aerospike.vector.ServerEndpointList + 1, // 6: aerospike.vector.AboutService.Get:input_type -> aerospike.vector.AboutRequest + 11, // 7: aerospike.vector.ClusterInfoService.GetNodeId:input_type -> google.protobuf.Empty + 11, // 8: aerospike.vector.ClusterInfoService.GetClusterId:input_type -> google.protobuf.Empty + 11, // 9: aerospike.vector.ClusterInfoService.GetClusteringState:input_type -> google.protobuf.Empty + 8, // 10: aerospike.vector.ClusterInfoService.GetClusterEndpoints:input_type -> aerospike.vector.ClusterNodeEndpointsRequest + 2, // 11: aerospike.vector.AboutService.Get:output_type -> aerospike.vector.AboutResponse + 4, // 12: aerospike.vector.ClusterInfoService.GetNodeId:output_type -> aerospike.vector.NodeId + 3, // 13: aerospike.vector.ClusterInfoService.GetClusterId:output_type -> aerospike.vector.ClusterId + 9, // 14: aerospike.vector.ClusterInfoService.GetClusteringState:output_type -> aerospike.vector.ClusteringState + 7, // 15: aerospike.vector.ClusterInfoService.GetClusterEndpoints:output_type -> aerospike.vector.ClusterNodeEndpoints + 11, // [11:16] is the sub-list for method output_type + 6, // [6:11] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_vector_db_proto_init() } @@ -617,13 +690,14 @@ func file_vector_db_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vector_db_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 10, NumExtensions: 0, NumServices: 2, }, GoTypes: file_vector_db_proto_goTypes, DependencyIndexes: file_vector_db_proto_depIdxs, + EnumInfos: file_vector_db_proto_enumTypes, MessageInfos: file_vector_db_proto_msgTypes, }.Build() File_vector_db_proto = out.File diff --git a/protos/vector-db.proto b/protos/vector-db.proto index 9b13002..3b1fbc2 100644 --- a/protos/vector-db.proto +++ b/protos/vector-db.proto @@ -17,6 +17,9 @@ message AboutRequest { message AboutResponse { // AVS server version. string version = 1; + + // Assigned node roles. + repeated NodeRole roles = 2; } // Cluster Id @@ -29,6 +32,19 @@ message NodeId { uint64 id = 1; } +// Node roles determine the tasks a node will undertake. +enum NodeRole { + // Node will handle ANN query related tasks. + INDEX_QUERY = 0; + + // Node will handle vector index update/maintenance tasks including + // index, insert, delete and update of vector records and index healing. + INDEX_UPDATE = 1; + + // Node will handle key value read operations. + KV_READ = 2; +} + // Server endpoint. message ServerEndpoint { // IP address or DNS name.