-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix lurking bug in datastore bucket sorting routines (#3281)
_Commit A demonstrates the bug, commit B fixes it and passes the test._ Our public API exposes a well-defined order when logging from a single-thread, and that order is encoded into our `RowId`s. As such it is expected that: 1. An incoming non-monotically increasing `RowId` (however it got there) toggles the dirty bit. This shouldn't be possible with the current clients since we do not yet have reordering retries (as far as I remember), but it'll be coming at some point and we can't trust the clients anyhow. 2. The `RowId` must be used as tie-breaker when sorting the buckets. We use a stable sort so this shouldn't be an issue as of today, but this is a nasty bug waiting to happen nonetheless.
- Loading branch information
Showing
3 changed files
with
58 additions
and
5 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