-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce the bin box and turn async deletes to bin moves
This fixes the fact that the asynchronous inbox is currently dangerously inconsistent. If on two nodes one writes new messages to a user's conversation with a room, and in another node that user is removed from the room, the order in which those events are flushed into the DB is now not ensured, and the risk of the removal being flushed before the insert, and therefore the insert recovering a conversation forever, is much higher than in the synchronous inbox. With the concept of boxes, the async backend can instead have a deleted box, called bin, so that removals aren't really removals, but just moves to another box, which are atomic and can interleave with modifications to that entry's other columns. Then asynchronously the deleted boxes can be collected, much like email clears the Bin after so many days.
- Loading branch information
1 parent
5a54f59
commit 2bb7f5f
Showing
7 changed files
with
82 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters