-
Couldn't load subscription status.
- Fork 456
Open
Description
Problem Summary
ShareDB operations can become permanently stuck when acknowledgments fail, with no built-in retry mechanism. Once an operation is marked as inflightOp, it will never be retried as flush blocks it.
What happens
- User calls submitOp() → Operation becomes inflightOp
- Operation is sent to server via connection.send()
- Server fails to respond (crash, network issue, etc.)
- inflightOp remains set forever
- flush() never calls _sendOp() again because inflightOp exists
- Operation is permanently stuck
Proposed fix
Change flush to resend the inflightOp, though you should add a backoff mechanism so it doesn't retry forever.
This is causing some data loss for us as this fails silently! User's would be typing away and because the doc does optimistic inserts it would appear everything was kosher, but on refresh of the page all their data (after the failed acknowledgement) was wiped out.
Metadata
Metadata
Assignees
Labels
No labels