From 9ec01bb9c13d5264d3d5bdaab65e9576f7e631c2 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 20 Oct 2022 13:22:10 +0300 Subject: [PATCH] [#1931] control: Allow to clear errors in `SetShardMode` RPC It hasn't been working since the initial implementation 7fb15fa1d0df0. Signed-off-by: Evgenii Stratonikov --- CHANGELOG.md | 1 + pkg/services/control/server/set_shard_mode.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36bbbb844..64ddac4ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Changelog for NeoFS Node ### Fixed - `writecache.max_object_size` is now correctly handled (#1925) - Correctly handle setting ONLINE netmap status after maintenance (#1922) +- Correctly reset shard errors in `ControlService.SetShardMode` RPC (#1931) ### Removed ### Updated diff --git a/pkg/services/control/server/set_shard_mode.go b/pkg/services/control/server/set_shard_mode.go index 555be1bd6..9e9b50b3b 100644 --- a/pkg/services/control/server/set_shard_mode.go +++ b/pkg/services/control/server/set_shard_mode.go @@ -37,7 +37,7 @@ func (s *Server) SetShardMode(_ context.Context, req *control.SetShardModeReques } for _, shardID := range s.getShardIDList(req.Body.GetShard_ID()) { - err = s.s.SetShardMode(shardID, m, false) + err = s.s.SetShardMode(shardID, m, req.Body.GetResetErrorCounter()) if err != nil { return nil, status.Error(codes.Internal, err.Error()) }