-
Notifications
You must be signed in to change notification settings - Fork 453
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
Avoid committing no-ops #616
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At the moment, if you submit a no-op (or two ops collide, resulting in one of them being transformed into a no-op), ShareDB will commit this to the database.
This has some downsides:
It would be nice to (optionally?) skip committing no-ops to the database to avoid the above.
The main issue with this is that clients expect every submitted op to increment the version (which wouldn't be true in this case), so we'd need to add some machinery around telling the client that their op was no-oped and they shouldn't increment the version (maybe we can extend the ack message?).
The lazy way to do it is to return an
OP_SUBMIT_REJECTED
(or create a new similar error code), but this would only work on invertible types, since non-invertible types would get a hard rollback, and lose any pending ops.The text was updated successfully, but these errors were encountered: