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

Fix lurking bug in datastore bucket sorting routines #3281

Merged
merged 5 commits into from Sep 12, 2023
Merged

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Sep 11, 2023

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 RowIds.

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.

What

Checklist

@teh-cmc teh-cmc added 🪳 bug Something isn't working ⛃ re_datastore affects the datastore itself labels Sep 11, 2023
@teh-cmc teh-cmc marked this pull request as draft September 11, 2023 17:36
@teh-cmc teh-cmc marked this pull request as ready for review September 11, 2023 17:37
@github-actions
Copy link

Size changes

Name main 3281/merge Change
plots.rrd 194.56 kiB 184.32 kiB -5.26%

crates/re_arrow_store/src/store_write.rs Outdated Show resolved Hide resolved
@teh-cmc teh-cmc merged commit 2fe28df into main Sep 12, 2023
26 checks passed
@teh-cmc teh-cmc deleted the cmc/bucket_sort_bug branch September 12, 2023 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working ⛃ re_datastore affects the datastore itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants