[#1048] control: Rename Blobstore
to Blobstor
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
f5a9735e1c
commit
876b0c53de
7 changed files with 11 additions and 11 deletions
|
@ -100,7 +100,7 @@ storage:
|
||||||
shard_pool_size: 15 # size of per-shard worker pools used for PUT operations
|
shard_pool_size: 15 # size of per-shard worker pools used for PUT operations
|
||||||
shard_num: 2 # total number of shards
|
shard_num: 2 # total number of shards
|
||||||
default: # section with the default shard parameters
|
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
|
use_write_cache: true # use write-cache
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ storage:
|
||||||
|
|
||||||
shard:
|
shard:
|
||||||
0:
|
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
|
use_write_cache: false # use write-cache
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ func (s *Server) ListShards(_ context.Context, req *control.ListShardsRequest) (
|
||||||
|
|
||||||
si.SetID(*shard.ID)
|
si.SetID(*shard.ID)
|
||||||
si.SetMetabasePath(shard.MetaBaseInfo.Path)
|
si.SetMetabasePath(shard.MetaBaseInfo.Path)
|
||||||
si.SetBlobstorePath(shard.BlobStorInfo.RootPath)
|
si.SetBlobstorPath(shard.BlobStorInfo.RootPath)
|
||||||
si.SetWriteCachePath(shard.WriteCacheInfo.Path)
|
si.SetWriteCachePath(shard.WriteCacheInfo.Path)
|
||||||
|
|
||||||
// FIXME: use real shard mode when there are more than just `read-write`
|
// FIXME: use real shard mode when there are more than just `read-write`
|
||||||
|
|
|
@ -101,7 +101,7 @@ func equalListShardResponseBodies(b1, b2 *control.ListShardsResponse_Body) bool
|
||||||
|
|
||||||
for i := range b1.Shards {
|
for i := range b1.Shards {
|
||||||
if b1.Shards[i].GetMetabasePath() != b2.Shards[i].GetMetabasePath() ||
|
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() ||
|
b1.Shards[i].GetWritecachePath() != b2.Shards[i].GetWritecachePath() ||
|
||||||
!bytes.Equal(b1.Shards[i].GetShard_ID(), b2.Shards[i].GetShard_ID()) {
|
!bytes.Equal(b1.Shards[i].GetShard_ID(), b2.Shards[i].GetShard_ID()) {
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -327,8 +327,8 @@ func (x *ShardInfo) SetMetabasePath(v string) {
|
||||||
x.MetabasePath = v
|
x.MetabasePath = v
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetBlobstorePath sets path to shard's blobstore.
|
// SetBlobstorPath sets path to shard's blobstor.
|
||||||
func (x *ShardInfo) SetBlobstorePath(v string) {
|
func (x *ShardInfo) SetBlobstorPath(v string) {
|
||||||
x.BlobstorPath = v
|
x.BlobstorPath = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ const (
|
||||||
_ = iota
|
_ = iota
|
||||||
shardInfoIDFNum
|
shardInfoIDFNum
|
||||||
shardInfoMetabaseFNum
|
shardInfoMetabaseFNum
|
||||||
shardInfoBlobstoreFNum
|
shardInfoBlobstorFNum
|
||||||
shardInfoWriteCacheFNum
|
shardInfoWriteCacheFNum
|
||||||
shardInfoModeFNum
|
shardInfoModeFNum
|
||||||
)
|
)
|
||||||
|
@ -364,7 +364,7 @@ func (x *ShardInfo) StableSize() int {
|
||||||
|
|
||||||
size += proto.BytesSize(shardInfoIDFNum, x.Shard_ID)
|
size += proto.BytesSize(shardInfoIDFNum, x.Shard_ID)
|
||||||
size += proto.StringSize(shardInfoMetabaseFNum, x.MetabasePath)
|
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.StringSize(shardInfoWriteCacheFNum, x.WritecachePath)
|
||||||
size += proto.EnumSize(shardInfoModeFNum, int32(x.Mode))
|
size += proto.EnumSize(shardInfoModeFNum, int32(x.Mode))
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ func (x *ShardInfo) StableMarshal(buf []byte) ([]byte, error) {
|
||||||
|
|
||||||
offset += n
|
offset += n
|
||||||
|
|
||||||
n, err = proto.StringMarshal(shardInfoBlobstoreFNum, buf[offset:], x.BlobstorPath)
|
n, err = proto.StringMarshal(shardInfoBlobstorFNum, buf[offset:], x.BlobstorPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
BIN
pkg/services/control/types.pb.go
generated
BIN
pkg/services/control/types.pb.go
generated
Binary file not shown.
|
@ -128,7 +128,7 @@ message ShardInfo {
|
||||||
// Path to shard's metabase.
|
// Path to shard's metabase.
|
||||||
string metabase_path = 2 [json_name = "metabasePath"];
|
string metabase_path = 2 [json_name = "metabasePath"];
|
||||||
|
|
||||||
// Path to shard's blobstore.
|
// Path to shard's blobstor.
|
||||||
string blobstor_path = 3 [json_name = "blobstorPath"];
|
string blobstor_path = 3 [json_name = "blobstorPath"];
|
||||||
|
|
||||||
// Path to shard's write-cache, empty if disabled.
|
// Path to shard's write-cache, empty if disabled.
|
||||||
|
|
|
@ -136,7 +136,7 @@ func generateShardInfo() *control.ShardInfo {
|
||||||
si.SetID(bin)
|
si.SetID(bin)
|
||||||
si.SetMode(control.ShardMode_READ_WRITE)
|
si.SetMode(control.ShardMode_READ_WRITE)
|
||||||
si.SetMetabasePath(path)
|
si.SetMetabasePath(path)
|
||||||
si.SetBlobstorePath(path)
|
si.SetBlobstorPath(path)
|
||||||
si.SetWriteCachePath(path)
|
si.SetWriteCachePath(path)
|
||||||
|
|
||||||
return si
|
return si
|
||||||
|
|
Loading…
Reference in a new issue