fix: changes are not delivered after a sync message wasn't delivered#368
fix: changes are not delivered after a sync message wasn't delivered#368yarolegovich wants to merge 3 commits into
Conversation
|
Thanks for digging into this. Firstly, can you check if this is still a problem rebase on To the actual issue. The sync protocol currently assumes a reliable in-order stream, i.e. we assume that there are no dropped or re-ordered messages. Under that model the missing piece here is that the network adapter needs to signal that a connection has been lost by emitting a To summarize, I think we should make sure the tests are actually failing when we expect them to and then we should "fix" the issue by ensuring that a |
|
I've been thinking about this a little more and had a chat with @pvh about it. One option which might make sense would be to disable the in-flight message tracking as a config option on the sync protocol. This would remove the requirement for reliable in-order streams at the cost of some message amplification. This seems like a reasonable intermediate step between now and the new sync protocol. @yarolegovich would that fit your needs? |
b5b124c to
12ae986
Compare
syncStateis saved locally right afterA.generateSyncMessage, even if the message delivery fails because there's no feedback from the network subsystem.syncmessages with the peer after they or us make the next change.theirNeedwill be ignored because these hashes are true insentHashes.sharedHeads).Also I have a cast to any because the real types are not what the declaration states. Some exposed fields are missing as well (inFlight, haveResponded).
In the tests I added: