From b422ac9f949dac6e906897a603a3f2cd5863eb47 Mon Sep 17 00:00:00 2001
From: Pavel Karpy
Date: Thu, 9 Feb 2023 00:15:36 +0300
Subject: [PATCH] [#2164] node: Fix multi-client error reporting
Missing `ReportError` method did not allow casing multi-client interface to
`errorReporter` interface and dropping broken connections.
`replicationClient` embeds that interface, and it is widely used across
node's code. Embedded interface does not allow casting its parent structure
to `errorReporter` and breaks multi client error reporting logic.
Multi-client scheme is extremely hard to maintain, it makes unpredictable
casts and does not allow tracking code flow, so it will be refactored in the
future anyway.
Signed-off-by: Pavel Karpy
---
pkg/core/client/client.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pkg/core/client/client.go b/pkg/core/client/client.go
index 0f6697882..f07dedc06 100644
--- a/pkg/core/client/client.go
+++ b/pkg/core/client/client.go
@@ -33,6 +33,8 @@ type MultiAddressClient interface {
// RawForAddress must return rawclient.Client
// for the passed network.Address.
RawForAddress(network.Address, func(cli *rawclient.Client) error) error
+
+ ReportError(error)
}
// NodeInfo groups information about a FrostFS storage node needed for Client construction.