Skip to content

Commit

Permalink
node: fix panic in error cases, fix #2970
Browse files Browse the repository at this point in the history
internalErr has some buffer to accept multiple errors, but it only processes
one of them, so if we have some cascading failures with multiple components
reporting an error some of them will end up panicking because of closed
channed. It's not very critical since the node is to die anyway, but it's
nothing good either.

This particular case shouldn't really happen after #2996, but leaving this
channel open is better than panic in case some other events lead to multiple
sends to it.

Signed-off-by: Roman Khimov <[email protected]>
  • Loading branch information
roman-khimov committed Nov 7, 2024
1 parent eccab58 commit fc873f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ attribute, which is used for container domain name in NNS contracts (#2954)
- Overriding the default container and object attributes only with the appropriate flags (#2985)
- RPC client reconnection failures leading to complete SN failure (#2797)
- `meta.DB.Open(readOnly)` moves metabase in RO mode (#3000)
- Panic in event listener related to inability to switch RPC node (#2970)

### Changed
- `ObjectService`'s `Put` RPC handler caches up to 10K lists of per-object sorted container nodes (#2901)
Expand Down
1 change: 0 additions & 1 deletion cmd/neofs-node/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ func wait(c *cfg) {
select {
case <-c.ctx.Done(): // graceful shutdown
case err := <-c.internalErr: // internal application error
close(c.internalErr)
c.ctxCancel()

c.log.Warn("internal application error",
Expand Down

0 comments on commit fc873f0

Please sign in to comment.