Skip to content
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

Noop batch causes storage events to fire twice #639

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BitPhinix
Copy link
Contributor

@BitPhinix BitPhinix commented Jan 20, 2023

While going further down the history rabbit hole, I discovered another issue, this time not related to history, and I'm still trying to figure out the best approach to fix it.

When performing changes inside batch that are essentially noops (i.e., inserting and immediately removing the same list item), we fire storage events for those noop changes twice (once for the local change and once when we receive the "confirmation ops" from the server).

This stems from how we filter out remote updates when handling remote changes: We ignore all operations that don't cause a change. This works fine for most cases, but not when we insert and remove the same item in the same batch because that batch will always cause an update (inserting and removing the item).

@BitPhinix BitPhinix self-assigned this Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant