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

Possible racing conditions with coediting sync #153

Open
pklaschka opened this issue Oct 22, 2020 · 1 comment
Open

Possible racing conditions with coediting sync #153

pklaschka opened this issue Oct 22, 2020 · 1 comment
Labels
🐛 bug Something isn't working ❓ question Further information is requested

Comments

@pklaschka
Copy link
Owner

While I haven't experienced this yet, it is possible that editing transactions could override each other, meaning messages that get, say, sent at the same time might interfere or override each other.

Possible (unconfirmed) way to reproduce:

  1. A clicks the delete button of a message (this opens the confirmation dialog and begins the scenegraph editing transaction)
  2. B sends a message (transaction starts and finishes)
  3. A confirms the message deletion (A's transaction finishes)

Also, this might happen with messages getting sent at the same time. The best way to reproduce this would probably be for one person to "spam-send" a burst of messages with another user trying to send a message within such a burst.

@pklaschka pklaschka added 🐛 bug Something isn't working ❓ question Further information is requested labels Oct 22, 2020
@pklaschka
Copy link
Owner Author

We might achieve this by storing the last transaction id (a unique ID) of a user in the plugin and the list of the most recent edit transactions in the document itself. Then, when the document updates, the plugin can check whether its last transaction id (which should be there) is still "in the document." If not, a warning with a CTA to reperform the transaction (sending the message or something similar) gets shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working ❓ question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant