Simplified model for Audience; Leverage join signal's referenceSequenceNumber for catch up logic#12164
Conversation
|
Ping - would love to keep moving in making Audience & connectivity transitions better :) |
|
Sorry, wasn't able to look today, will set another reminder for Monday! |
| connectionStateHandler.receivedConnectEvent(connectionDetails); | ||
| assert.strictEqual(connectionStateHandler.connectionState, ConnectionState.CatchingUp, | ||
| "Client should be in connecting state"); | ||
|
|
There was a problem hiding this comment.
Next few lines: In practice how could receivedAddMemberEvent be called before initProtocol?
There was a problem hiding this comment.
It took me a while to remember, but I think here is what I'm trying to do here:
First of all, this does not result in a call to ConnectionStateHandler, it only sets up quorum state.
There is a tiny tiny race possible, where these events happen in this order:
1.a connection is established (no "cached" mode is used, so it happens in parallel / faster than other steps)
2. some other client produces a summary
3. we get "lucky" and load from that summary as our initial snapshot
4. ConnectionStateHandler.initProtocol is called, "self" is already in the quorum.
We can prevent that case by reordering # 1 & # 3 in Container.load().
Thoughts? Meanwhile, I'll add comments for that sequence here. and in the code
markfields
left a comment
There was a problem hiding this comment.
Makes sense! Please take a look at my comments, but I will sign off now to unblock you.
…to JoinSignals_final
Final break out from #12042
Most important changes:
Two main pieces feedback I'm looking for:
Back-compat considerations:
Note: depending on results, I may check in this code dark (i.e. flip default feature gate value) and keep working on enabling it.