-
Notifications
You must be signed in to change notification settings - Fork 536
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
Clean up stale local references referring to old interval endpoints #20026
Conversation
⯅ @fluid-example/bundle-size-tests: +238 Bytes
Baseline commit: 023de01 |
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.
It still feels a bit odd to me that this change would affect anything, or only affect the right things. Specifically, I'm not sure why this change doesn't need to consider if the change is made locally vs remotely. Usually local changes are optimistically applied, and then the real change is commit/finalized/completed on ack. That said, interval collections have a pretty odd flow for dealing with ops and acks plus i know we have pretty good testing here with fuzz, what's added here, and otherwise, so i trust we are doing the right things overall.
There doesn't seem to be anything wrong with this change itself, but I still don't understand how/why it fixes the bug which makes me confused and wondering if there are more lurking bugs. |
The fix is good. The root problem is the logic in |
Co-authored-by: Scarlett Lee <[email protected]>
During the interval change codepath, many local references are created and updated, but local references for removed interval endpoints were never cleaned up. This was causing a bug where after removing a range of text and reverting the remove, the interval endpoints would not return to the position at which they were created. Some existing unit tests also used the stale references, and these only worked in the past because we didn't do any clean up. Those tests now use the updated references.
AB#7044, #19352