fix: eventbus index removal, ordered channel query logging, and dst chain log#4431
Open
hitchhooker wants to merge 1 commit intoinformalsystems:masterfrom
Conversation
…hain log
fixes three bugs that could cause events to be lost or make debugging harder:
1. eventbus: fix index removal when multiple subscribers disconnect
- removing indices in ascending order caused off-by-one errors because
each removal shifts subsequent indices
- now removes in reverse order to preserve correct indices
- added test to verify correct behavior
2. packet worker: log errors when querying next_sequence_receive fails
- previously silently swallowed with .ok()
- now logs warning so operators can see query failures
- fallback behavior (triggering clear) is preserved
3. supervisor: fix wrong chain id in log message
- was logging src_chain_id when dst_chain_id failed to spawn
- now correctly logs dst_chain_id for easier debugging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fixes three bugs that could cause events to be lost or make debugging harder.
Changes
1. EventBus: fix index removal when multiple subscribers disconnect
File:
crates/relayer/src/event/bus.rsWhen multiple subscribers disconnected simultaneously, removing indices in ascending order caused off-by-one errors:
Added test to verify correct behavior with multiple disconnected subscribers.
2. Packet worker: log errors when querying next_sequence_receive fails
File:
crates/relayer/src/worker/packet.rsPreviously errors were silently swallowed with
.ok(). Now logs a warning so operators can see query failures while preserving the fallback behavior (triggering packet clearing).3. Supervisor: fix wrong chain id in log message
File:
crates/relayer/src/supervisor.rsWas logging
src_chain_idwhendst_chain_idfailed to spawn. Now correctly logsdst_chain_idfor easier debugging.Test Plan
cargo check -p ibc-relayerpassescargo test -p ibc-relayer --libpasses (73 tests, +1 new)multiple_disconnected_subscribersverifies EventBus fix