From b6ab649d5b86b79dc68c84059553b18ea1c9f675 Mon Sep 17 00:00:00 2001 From: Injun Song Date: Tue, 10 Oct 2023 08:03:29 +0900 Subject: [PATCH] refactor(storagenode): rename jsontag of proto/snpb.(StorageNodeMetadataDescriptor).LogStreamReplicas This PR renames jsontag of `proto/snpb.(StorageNodeMetadataDescriptor).LogStreamReplicas` from logStreams to logStreamReplicas. It is more explicit and correct naming. Resolves #89. --- bin/tests/test_start_varlogsn.py | 4 +- proto/snpb/metadata.pb.go | 96 +++++++++---------- proto/snpb/metadata.proto | 4 +- .../varlogctl/addstoragenode.0.golden.json | 2 +- .../varlogctl/getstoragenode.0.golden.json | 2 +- .../varlogctl/getstoragenode.1.golden.json | 2 +- .../varlogctl/liststoragenodes.1.golden.json | 2 +- 7 files changed, 56 insertions(+), 56 deletions(-) diff --git a/bin/tests/test_start_varlogsn.py b/bin/tests/test_start_varlogsn.py index 16d0faf43..01475dc17 100644 --- a/bin/tests/test_start_varlogsn.py +++ b/bin/tests/test_start_varlogsn.py @@ -27,8 +27,8 @@ def test_parse_get_storagenode_without_logstreams_response(self): snm = json.load(f) self.assertIn("storageNodeId", snm) self.assertIn("address", snm) - self.assertIn("logStreams", snm) - self.assertIsInstance(snm["logStreams"], list) + self.assertIn("logStreamReplicas", snm) + self.assertIsInstance(snm["logStreamReplicas"], list) if __name__ == '__main__': diff --git a/proto/snpb/metadata.pb.go b/proto/snpb/metadata.pb.go index f0ae277ec..56d8b0449 100644 --- a/proto/snpb/metadata.pb.go +++ b/proto/snpb/metadata.pb.go @@ -40,8 +40,8 @@ type StorageNodeMetadataDescriptor struct { ClusterID github_com_kakao_varlog_pkg_types.ClusterID `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3,casttype=github.com/kakao/varlog/pkg/types.ClusterID" json:"clusterId"` varlogpb.StorageNode `protobuf:"bytes,2,opt,name=storage_node,json=storageNode,proto3,embedded=storage_node" json:""` Storages []varlogpb.StorageDescriptor `protobuf:"bytes,3,rep,name=storages,proto3" json:"storages"` - // LogStreams are the list of metadata for log stream replicas. - LogStreamReplicas []LogStreamReplicaMetadataDescriptor `protobuf:"bytes,4,rep,name=log_stream_replicas,json=logStreamReplicas,proto3" json:"logStreams"` + // LogStreamReplicas are the list of metadata for log stream replicas. + LogStreamReplicas []LogStreamReplicaMetadataDescriptor `protobuf:"bytes,4,rep,name=log_stream_replicas,json=logStreamReplicas,proto3" json:"logStreamReplicas"` Status varlogpb.StorageNodeStatus `protobuf:"varint,5,opt,name=status,proto3,enum=varlog.varlogpb.StorageNodeStatus" json:"status,omitempty"` StartTime time.Time `protobuf:"bytes,6,opt,name=start_time,json=startTime,proto3,stdtime" json:"startTime"` } @@ -255,53 +255,53 @@ func init() { func init() { proto.RegisterFile("proto/snpb/metadata.proto", fileDescriptor_b0d7c3885ca513ae) } var fileDescriptor_b0d7c3885ca513ae = []byte{ - // 726 bytes of a gzipped FileDescriptorProto + // 723 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xc1, 0x4e, 0xdb, 0x4a, - 0x14, 0x8d, 0x21, 0x04, 0x32, 0x41, 0x4f, 0x30, 0x3c, 0x84, 0xc9, 0x7b, 0x8d, 0xd3, 0x2c, 0xaa, - 0x54, 0x2d, 0xb6, 0x44, 0x37, 0x15, 0xea, 0xa6, 0x2e, 0x12, 0x45, 0x02, 0x54, 0x39, 0x15, 0x95, - 0x2a, 0x55, 0xd6, 0x24, 0x99, 0x3a, 0x56, 0xec, 0x8c, 0x3b, 0x33, 0x06, 0xc1, 0x57, 0xf0, 0x09, - 0xec, 0xfa, 0x2b, 0x2c, 0x59, 0x55, 0x5d, 0xb9, 0x12, 0xd9, 0x54, 0xf9, 0x04, 0x56, 0x95, 0xc7, - 0xe3, 0x38, 0x75, 0x88, 0xc2, 0x6e, 0xe6, 0xde, 0x7b, 0xce, 0xbd, 0xf7, 0xcc, 0x49, 0x0c, 0x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bc, 0xe0, 0xf1, 0xbc, 0x39, 0xae, 0xe0, 0x9d, 0x08, 0x64, + 0x3f, 0x2c, 0xfd, 0xed, 0xf5, 0x6d, 0x53, 0xb8, 0xb9, 0x6d, 0x0a, 0x97, 0x83, 0x66, 0xe5, 0x6a, + 0xd0, 0x14, 0x6e, 0x06, 0xcd, 0xca, 0xaf, 0x41, 0xb3, 0xf2, 0xa5, 0x35, 0xd3, 0x2f, 0xe3, 0x2f, + 0x8d, 0x55, 0xe5, 0xe7, 0xd7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xba, 0xc1, 0x56, 0x7e, + 0x06, 0x00, 0x00, } func (this *StorageNodeMetadataDescriptor) Equal(that interface{}) bool { diff --git a/proto/snpb/metadata.proto b/proto/snpb/metadata.proto index 4cf524730..3a7fae0aa 100644 --- a/proto/snpb/metadata.proto +++ b/proto/snpb/metadata.proto @@ -39,9 +39,9 @@ message StorageNodeMetadataDescriptor { repeated varlogpb.StorageDescriptor storages = 3 [(gogoproto.nullable) = false]; - // LogStreams are the list of metadata for log stream replicas. + // LogStreamReplicas are the list of metadata for log stream replicas. repeated LogStreamReplicaMetadataDescriptor log_stream_replicas = 4 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "logStreams"]; + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "logStreamReplicas"]; varlogpb.StorageNodeStatus status = 5; diff --git a/testdata/varlogctl/addstoragenode.0.golden.json b/testdata/varlogctl/addstoragenode.0.golden.json index 63b272566..a2da72056 100644 --- a/testdata/varlogctl/addstoragenode.0.golden.json +++ b/testdata/varlogctl/addstoragenode.0.golden.json @@ -1 +1 @@ -{"clusterId":1,"storageNodeId":1,"address":"127.0.0.1:10000","storages":[{"path":"/tmp1","used":32768,"total":1048576},{"path":"/tmp2","used":65536,"total":2097152}],"logStreams":[{"storageNodeId":1,"address":"127.0.0.1:10000","topicId":1,"logStreamId":1,"version":1,"globalHighWatermark":100,"localLowWatermark":{"llsn":1,"glsn":1},"localHighWatermark":{"llsn":51,"glsn":97},"path":"/tmp1/foo","storage_size_bytes":4096,"createdTime":"0001-01-01T00:00:00Z","updatedTime":"0001-01-01T00:00:00Z"}],"startTime":"2022-10-01T03:23:21Z","createTime":"2022-09-27T17:46:40Z","lastHeartbeatTime":"2022-11-01T11:37:19Z"} \ No newline at end of file +{"clusterId":1,"storageNodeId":1,"address":"127.0.0.1:10000","storages":[{"path":"/tmp1","used":32768,"total":1048576},{"path":"/tmp2","used":65536,"total":2097152}],"logStreamReplicas":[{"storageNodeId":1,"address":"127.0.0.1:10000","topicId":1,"logStreamId":1,"version":1,"globalHighWatermark":100,"localLowWatermark":{"llsn":1,"glsn":1},"localHighWatermark":{"llsn":51,"glsn":97},"path":"/tmp1/foo","storage_size_bytes":4096,"createdTime":"0001-01-01T00:00:00Z","updatedTime":"0001-01-01T00:00:00Z"}],"startTime":"2022-10-01T03:23:21Z","createTime":"2022-09-27T17:46:40Z","lastHeartbeatTime":"2022-11-01T11:37:19Z"} \ No newline at end of file diff --git a/testdata/varlogctl/getstoragenode.0.golden.json b/testdata/varlogctl/getstoragenode.0.golden.json index 63b272566..a2da72056 100644 --- a/testdata/varlogctl/getstoragenode.0.golden.json +++ b/testdata/varlogctl/getstoragenode.0.golden.json @@ -1 +1 @@ -{"clusterId":1,"storageNodeId":1,"address":"127.0.0.1:10000","storages":[{"path":"/tmp1","used":32768,"total":1048576},{"path":"/tmp2","used":65536,"total":2097152}],"logStreams":[{"storageNodeId":1,"address":"127.0.0.1:10000","topicId":1,"logStreamId":1,"version":1,"globalHighWatermark":100,"localLowWatermark":{"llsn":1,"glsn":1},"localHighWatermark":{"llsn":51,"glsn":97},"path":"/tmp1/foo","storage_size_bytes":4096,"createdTime":"0001-01-01T00:00:00Z","updatedTime":"0001-01-01T00:00:00Z"}],"startTime":"2022-10-01T03:23:21Z","createTime":"2022-09-27T17:46:40Z","lastHeartbeatTime":"2022-11-01T11:37:19Z"} \ No newline at end of file +{"clusterId":1,"storageNodeId":1,"address":"127.0.0.1:10000","storages":[{"path":"/tmp1","used":32768,"total":1048576},{"path":"/tmp2","used":65536,"total":2097152}],"logStreamReplicas":[{"storageNodeId":1,"address":"127.0.0.1:10000","topicId":1,"logStreamId":1,"version":1,"globalHighWatermark":100,"localLowWatermark":{"llsn":1,"glsn":1},"localHighWatermark":{"llsn":51,"glsn":97},"path":"/tmp1/foo","storage_size_bytes":4096,"createdTime":"0001-01-01T00:00:00Z","updatedTime":"0001-01-01T00:00:00Z"}],"startTime":"2022-10-01T03:23:21Z","createTime":"2022-09-27T17:46:40Z","lastHeartbeatTime":"2022-11-01T11:37:19Z"} \ No newline at end of file diff --git a/testdata/varlogctl/getstoragenode.1.golden.json b/testdata/varlogctl/getstoragenode.1.golden.json index 0710f0d04..03fe36995 100644 --- a/testdata/varlogctl/getstoragenode.1.golden.json +++ b/testdata/varlogctl/getstoragenode.1.golden.json @@ -1 +1 @@ -{"clusterId":1,"storageNodeId":1,"address":"127.0.0.1:10000","storages":[{"path":"/tmp1","used":32768,"total":1048576},{"path":"/tmp2","used":65536,"total":2097152}],"logStreams":[],"startTime":"2022-10-01T03:23:21Z","createTime":"2022-09-27T17:46:40Z","lastHeartbeatTime":"2022-11-01T11:37:19Z"} \ No newline at end of file +{"clusterId":1,"storageNodeId":1,"address":"127.0.0.1:10000","storages":[{"path":"/tmp1","used":32768,"total":1048576},{"path":"/tmp2","used":65536,"total":2097152}],"logStreamReplicas":[],"startTime":"2022-10-01T03:23:21Z","createTime":"2022-09-27T17:46:40Z","lastHeartbeatTime":"2022-11-01T11:37:19Z"} \ No newline at end of file diff --git a/testdata/varlogctl/liststoragenodes.1.golden.json b/testdata/varlogctl/liststoragenodes.1.golden.json index 8fd955781..2508ab2d9 100644 --- a/testdata/varlogctl/liststoragenodes.1.golden.json +++ b/testdata/varlogctl/liststoragenodes.1.golden.json @@ -1 +1 @@ -[{"clusterId":1,"storageNodeId":1,"address":"127.0.0.1:10000","storages":[{"path":"/tmp1","used":32768,"total":1048576},{"path":"/tmp2","used":65536,"total":2097152}],"logStreams":[{"storageNodeId":1,"address":"127.0.0.1:10000","topicId":1,"logStreamId":1,"version":1,"globalHighWatermark":100,"localLowWatermark":{"llsn":1,"glsn":1},"localHighWatermark":{"llsn":51,"glsn":97},"path":"/tmp1/foo","storage_size_bytes":4096,"createdTime":"0001-01-01T00:00:00Z","updatedTime":"0001-01-01T00:00:00Z"}],"startTime":"2022-10-01T03:23:21Z","createTime":"2022-09-27T17:46:40Z","lastHeartbeatTime":"2022-11-01T11:37:19Z"}] \ No newline at end of file +[{"clusterId":1,"storageNodeId":1,"address":"127.0.0.1:10000","storages":[{"path":"/tmp1","used":32768,"total":1048576},{"path":"/tmp2","used":65536,"total":2097152}],"logStreamReplicas":[{"storageNodeId":1,"address":"127.0.0.1:10000","topicId":1,"logStreamId":1,"version":1,"globalHighWatermark":100,"localLowWatermark":{"llsn":1,"glsn":1},"localHighWatermark":{"llsn":51,"glsn":97},"path":"/tmp1/foo","storage_size_bytes":4096,"createdTime":"0001-01-01T00:00:00Z","updatedTime":"0001-01-01T00:00:00Z"}],"startTime":"2022-10-01T03:23:21Z","createTime":"2022-09-27T17:46:40Z","lastHeartbeatTime":"2022-11-01T11:37:19Z"}] \ No newline at end of file