-
Notifications
You must be signed in to change notification settings - Fork 940
Fix MutationQueue issue resulting in re-sending acknowledged writes. #559
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
Conversation
getNextMutationBatchAfterBatchId() was not respecting highestAcknowledgedBatchId and therefore we were resending writes after the network was disabled / re-enabled as reported here: firebase/firebase-ios-sdk#772
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a question
fromCache: true | ||
}) | ||
|
||
// handshake + write + close = 3 requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is a bit too terse. Is this happening as a result of disabling the network or something else?
If so it's weird because I would have thought when we disable the network nothing happens.
This could be a little clearer if you expected the write stream request count was 2 above and then this would show that all we did after that was close.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Added the requestCount==2 expectation prior to close. FWIW, disabling the network sends an additional no-op write (
this.writeMutations([]); |
Port of: firebase/firebase-js-sdk#559 Fixes #772 getNextMutationBatchAfterBatchId() was not respecting highestAcknowledgedBatchId and therefore we were resending writes after the network was disabled / re-enabled.
Port of: firebase/firebase-js-sdk#559 Fixes #772 getNextMutationBatchAfterBatchId() was not respecting highestAcknowledgedBatchId and therefore we were resending writes after the network was disabled / re-enabled.
Port of: firebase/firebase-js-sdk#559 Fixes #772 getNextMutationBatchAfterBatchId() was not respecting highestAcknowledgedBatchId and therefore we were resending writes after the network was disabled / re-enabled.
Changes LGTM too. Thanks for the changelog entry. |
…909) Port of: firebase/firebase-js-sdk#559 Should address #772 once released. getNextMutationBatchAfterBatchId() was not respecting highestAcknowledgedBatchId and therefore we were resending writes after the network was disabled / re-enabled.
…irebase#909) Port of: firebase/firebase-js-sdk#559 Should address firebase#772 once released. getNextMutationBatchAfterBatchId() was not respecting highestAcknowledgedBatchId and therefore we were resending writes after the network was disabled / re-enabled.
getNextMutationBatchAfterBatchId() was not respecting highestAcknowledgedBatchId and therefore we were resending writes if they had been acknowledged but not removed (aka the held write acks case). This showed up when a user enabled / disabled the network as reported here and I've included a spec test to emulate that case: firebase/firebase-ios-sdk#772 (cc/ @gsoltis FYI).
This is the JS port which I'll port to iOS (where the issue was reported) once we're happy with the fix here.