From 4e8cc51e7ba62059f559d6a7e2632e24f1c5a477 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 19 Nov 2020 18:04:09 +0300 Subject: [PATCH] [#189] shard: Extend Info with WeightValues Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/shard/info.go | 3 +++ pkg/local_object_storage/shard/shard.go | 2 -- pkg/local_object_storage/shard/weight.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/local_object_storage/shard/info.go b/pkg/local_object_storage/shard/info.go index 465a802d0..dba9787be 100644 --- a/pkg/local_object_storage/shard/info.go +++ b/pkg/local_object_storage/shard/info.go @@ -15,6 +15,9 @@ type Info struct { // Information about the BLOB storage. BlobStorInfo blobstor.Info + + // Weight parameters of the shard. + WeightValues WeightValues } // DumpInfo returns information about the Shard. diff --git a/pkg/local_object_storage/shard/shard.go b/pkg/local_object_storage/shard/shard.go index 8e5833cff..3e148c2ef 100644 --- a/pkg/local_object_storage/shard/shard.go +++ b/pkg/local_object_storage/shard/shard.go @@ -13,8 +13,6 @@ type Shard struct { mode *atomic.Uint32 - weight WeightValues - blobStor *blobstor.BlobStor metaBase *meta.DB diff --git a/pkg/local_object_storage/shard/weight.go b/pkg/local_object_storage/shard/weight.go index 90bb84020..0ab5ad61d 100644 --- a/pkg/local_object_storage/shard/weight.go +++ b/pkg/local_object_storage/shard/weight.go @@ -8,5 +8,5 @@ type WeightValues struct { // WeightValues returns current weight values of the Shard. func (s *Shard) WeightValues() WeightValues { - return s.weight + return s.info.WeightValues }