-
Notifications
You must be signed in to change notification settings - Fork 0
MRP protocol state machine issues #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lhoward
wants to merge
17
commits into
main
Choose a base branch
from
x460-interop-issue
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+327
−367
Conversation
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
8702180 to
5924f73
Compare
bcb7247 to
33368db
Compare
06c1b4a to
f0241d7
Compare
f0241d7 to
594e098
Compare
a496e87 to
3a9288b
Compare
The talker propagation logic in _onRegisterStreamIndication read port state once at the beginning of the apply loop and then used that snapshot across multiple await suspension points where concurrent operations could modify the underlying state. This was particularly problematic for _canBridgeTalker, which makes admission control decisions based on bandwidth calculations. This change addresses the race condition by reading port state twice: once for the initial pruning check (where a snapshot is acceptable) and again immediately before _canBridgeTalker (to ensure bandwidth calculations use current state), reducing the window for stale data to cause incorrect admission control decisions.
* when leaveNow() is called, it should behave as if the leavetimer has immediately expired (35.2.6) * always GC attributes after running the state machine handler * _findRegisteredAttributes() returns an array of registered attributes matching the specified filter
The previous implementation used a continuously running periodic join timer that transmitted PDUs multiple times per second regardless of state changes. Note: this removes the point-to-point optimization in the Participant state machine. We will add this back later.
…teners When a TalkerFailed attribute is received from an upstream bridge and local listeners exist, the merged listener declaration must be listenerAskingFailed regardless of the current listener states.
this can only happen if a Talker Failed was replaced with a Talker Advertise, and we will always update with the most recent state; this avoids needlessly updating the listener ports
The _updateExistingListeners function accommodates the race condition where listeners arrive before talkers, but it did not guard against the opposite race where a talker arrives and then immediately departs before port parameters can be updated.
The mutual exclusion logic for ensuring only one talker attribute type (talkerAdvertise or talkerFailed) exists per stream appeared in two locations with nearly identical code: once when handling peer events and once when propagating to other ports. This change extracts the common pattern into a private _enforceTalkerMutualExclusion helper function that handles both deregister (for peer events) and leave (for propagation) operations.
The _findTalkerRegistration(for:) method that searches across all participants was declared as throwing but never actually throws any errors, instead returning nil when no talker is found.
3a9288b to
51af223
Compare
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.
We are seeing a number of state machine issues with stream persistence in the following topology:
XMOS listener <-> OpenSRP <-> Extreme x460 <-> MOTU 16A (2025)
This PR tracks fixes for them.