From 876b0c53de1f9cddca4b905c945c25e9664f178e Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Mon, 27 Dec 2021 15:03:24 +0300 Subject: [PATCH] [#1048] control: Rename `Blobstore` to `Blobstor` Signed-off-by: Pavel Karpy --- config/example/node.yaml | 4 ++-- pkg/services/control/server/list_shards.go | 2 +- pkg/services/control/service_test.go | 2 +- pkg/services/control/types.go | 10 +++++----- pkg/services/control/types.pb.go | Bin 25709 -> 25708 bytes pkg/services/control/types.proto | 2 +- pkg/services/control/types_test.go | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config/example/node.yaml b/config/example/node.yaml index 0d8d39a7e..569b49950 100644 --- a/config/example/node.yaml +++ b/config/example/node.yaml @@ -100,7 +100,7 @@ storage: shard_pool_size: 15 # size of per-shard worker pools used for PUT operations shard_num: 2 # total number of shards default: # section with the default shard parameters - resync_metabase: true # sync metabase with blobstore on start, expensive, leave false until complete understanding + resync_metabase: true # sync metabase with blobstor on start, expensive, leave false until complete understanding use_write_cache: true # use write-cache @@ -131,7 +131,7 @@ storage: shard: 0: - resync_metabase: false # sync metabase with blobstore on start, expensive, leave false until complete understanding + resync_metabase: false # sync metabase with blobstor on start, expensive, leave false until complete understanding use_write_cache: false # use write-cache diff --git a/pkg/services/control/server/list_shards.go b/pkg/services/control/server/list_shards.go index e5de3b996..8e5ddae6c 100644 --- a/pkg/services/control/server/list_shards.go +++ b/pkg/services/control/server/list_shards.go @@ -29,7 +29,7 @@ func (s *Server) ListShards(_ context.Context, req *control.ListShardsRequest) ( si.SetID(*shard.ID) si.SetMetabasePath(shard.MetaBaseInfo.Path) - si.SetBlobstorePath(shard.BlobStorInfo.RootPath) + si.SetBlobstorPath(shard.BlobStorInfo.RootPath) si.SetWriteCachePath(shard.WriteCacheInfo.Path) // FIXME: use real shard mode when there are more than just `read-write` diff --git a/pkg/services/control/service_test.go b/pkg/services/control/service_test.go index b0c2ce1f2..eacb0322d 100644 --- a/pkg/services/control/service_test.go +++ b/pkg/services/control/service_test.go @@ -101,7 +101,7 @@ func equalListShardResponseBodies(b1, b2 *control.ListShardsResponse_Body) bool for i := range b1.Shards { if b1.Shards[i].GetMetabasePath() != b2.Shards[i].GetMetabasePath() || - b1.Shards[i].GetBlobstorePath() != b2.Shards[i].GetBlobstorePath() || + b1.Shards[i].GetBlobstorPath() != b2.Shards[i].GetBlobstorPath() || b1.Shards[i].GetWritecachePath() != b2.Shards[i].GetWritecachePath() || !bytes.Equal(b1.Shards[i].GetShard_ID(), b2.Shards[i].GetShard_ID()) { return false diff --git a/pkg/services/control/types.go b/pkg/services/control/types.go index b21a1cd43..af16313f2 100644 --- a/pkg/services/control/types.go +++ b/pkg/services/control/types.go @@ -327,8 +327,8 @@ func (x *ShardInfo) SetMetabasePath(v string) { x.MetabasePath = v } -// SetBlobstorePath sets path to shard's blobstore. -func (x *ShardInfo) SetBlobstorePath(v string) { +// SetBlobstorPath sets path to shard's blobstor. +func (x *ShardInfo) SetBlobstorPath(v string) { x.BlobstorPath = v } @@ -346,7 +346,7 @@ const ( _ = iota shardInfoIDFNum shardInfoMetabaseFNum - shardInfoBlobstoreFNum + shardInfoBlobstorFNum shardInfoWriteCacheFNum shardInfoModeFNum ) @@ -364,7 +364,7 @@ func (x *ShardInfo) StableSize() int { size += proto.BytesSize(shardInfoIDFNum, x.Shard_ID) size += proto.StringSize(shardInfoMetabaseFNum, x.MetabasePath) - size += proto.StringSize(shardInfoBlobstoreFNum, x.BlobstorPath) + size += proto.StringSize(shardInfoBlobstorFNum, x.BlobstorPath) size += proto.StringSize(shardInfoWriteCacheFNum, x.WritecachePath) size += proto.EnumSize(shardInfoModeFNum, int32(x.Mode)) @@ -408,7 +408,7 @@ func (x *ShardInfo) StableMarshal(buf []byte) ([]byte, error) { offset += n - n, err = proto.StringMarshal(shardInfoBlobstoreFNum, buf[offset:], x.BlobstorPath) + n, err = proto.StringMarshal(shardInfoBlobstorFNum, buf[offset:], x.BlobstorPath) if err != nil { return nil, err } diff --git a/pkg/services/control/types.pb.go b/pkg/services/control/types.pb.go index 84ae9a1ccb0693b910721e4f3058fb0fac860228..746d0cda9533a904111d658656b915e29cfe7a7a 100644 GIT binary patch delta 14 VcmaERg7M7>#tn8Fo9#99YydXm1_l5C delta 16 XcmaEJg7NJM#tn8FjH#RLH1uo$LPQ2@ diff --git a/pkg/services/control/types.proto b/pkg/services/control/types.proto index 14086bdc8..4fc3c6069 100644 --- a/pkg/services/control/types.proto +++ b/pkg/services/control/types.proto @@ -128,7 +128,7 @@ message ShardInfo { // Path to shard's metabase. string metabase_path = 2 [json_name = "metabasePath"]; - // Path to shard's blobstore. + // Path to shard's blobstor. string blobstor_path = 3 [json_name = "blobstorPath"]; // Path to shard's write-cache, empty if disabled. diff --git a/pkg/services/control/types_test.go b/pkg/services/control/types_test.go index 4f16f1b2e..619e4b61f 100644 --- a/pkg/services/control/types_test.go +++ b/pkg/services/control/types_test.go @@ -136,7 +136,7 @@ func generateShardInfo() *control.ShardInfo { si.SetID(bin) si.SetMode(control.ShardMode_READ_WRITE) si.SetMetabasePath(path) - si.SetBlobstorePath(path) + si.SetBlobstorPath(path) si.SetWriteCachePath(path) return si