fix(zakura): avoid no-op sequencer view wakeups#437
Merged
Conversation
This was referenced Jul 3, 2026
…equencer-noop-wake # Conflicts: # CHANGELOG.md
evan-forbes
marked this pull request as ready for review
July 4, 2026 00:36
ValarDragon
approved these changes
Jul 4, 2026
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.
Motivation
Split out of #435.
Under sustained byte-budget backpressure, the sequencer could publish an otherwise-identical
SequencerViewafter a no-op control input. Becausewatch::send_replacewakes watchers even when no scheduling field changed, a peer routine waiting onsequencer_view.changed()could wake, retry refill, request floor funding again, and immediately repeat. On a real clock this wastes CPU and can starve progress under load; understart_pausedit can wedge because Tokio virtual time only advances when every task parks.Solution
PartialEqforSequencerView.send_if_modified.view_schedulable_neso throughput-rate-only refreshes update the stored view but do not wake the reactor or peer routines.sequencer_view_rate_refresh_does_not_wake_watchers, a deterministic focused test that checks rate-only refreshes do not notify while schedulable changes still notify.Validation
cargo fmt --all -- --checkcargo test -p zebra-network sequencer_view_rate_refresh_does_not_wake_watchersAI Disclosure
Used Codex to split #435 into focused branches/PRs, add the focused deterministic test, and run the targeted validation above.