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 flush picking non-consecutive memtables #10921

Closed

Conversation

ajkr
Copy link
Contributor

@ajkr ajkr commented Nov 4, 2022

Prevents MemTableList::PickMemtablesToFlush() from picking non-consecutive memtables. It leads to wrong ordering in L0 if the files are committed, or an error like below if force_consistency_checks=true catches it:

Corruption: force_consistency_checks: VersionBuilder: L0 file #25 with seqno 320416 368066 vs. file #24 with seqno 336037 352068

Test Plan: fix the expectation in the existing test of this behavior

@ajkr ajkr changed the title Fix flush picking non consecutive memtables Fix flush picking non-consecutive memtables Nov 4, 2022
@ajkr ajkr force-pushed the fix-flush-picking-non-consecutive-memtables branch from b113110 to 96adb16 Compare November 4, 2022 21:12
@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@riversand963
Copy link
Contributor

Thanks @ajkr for the fix!

@ajkr
Copy link
Contributor Author

ajkr commented Nov 4, 2022

Thanks for the review!

ajkr added a commit that referenced this pull request Nov 24, 2022
Summary:
Prevents `MemTableList::PickMemtablesToFlush()` from picking non-consecutive memtables. It leads to wrong ordering in L0 if the files are committed, or an error like below if force_consistency_checks=true catches it:

```
Corruption: force_consistency_checks: VersionBuilder: L0 file #25 with seqno 320416 368066 vs. file #24 with seqno 336037 352068
```

Pull Request resolved: #10921

Test Plan: fix the expectation in the existing test of this behavior

Reviewed By: riversand963

Differential Revision: D41046935

Pulled By: ajkr

fbshipit-source-id: 783696bff56115063d5dc5856dfaed6a9881d1ab
ajkr added a commit that referenced this pull request Nov 24, 2022
Summary:
Prevents `MemTableList::PickMemtablesToFlush()` from picking non-consecutive memtables. It leads to wrong ordering in L0 if the files are committed, or an error like below if force_consistency_checks=true catches it:

```
Corruption: force_consistency_checks: VersionBuilder: L0 file #25 with seqno 320416 368066 vs. file #24 with seqno 336037 352068
```

Pull Request resolved: #10921

Test Plan: fix the expectation in the existing test of this behavior

Reviewed By: riversand963

Differential Revision: D41046935

Pulled By: ajkr

fbshipit-source-id: 783696bff56115063d5dc5856dfaed6a9881d1ab
Yuval-Ariel pushed a commit to speedb-io/speedb that referenced this pull request Jan 11, 2023
Summary:
Prevents `MemTableList::PickMemtablesToFlush()` from picking non-consecutive memtables. It leads to wrong ordering in L0 if the files are committed, or an error like below if force_consistency_checks=true catches it:

```
Corruption: force_consistency_checks: VersionBuilder: L0 file facebook/rocksdb#25 with seqno 320416 368066 vs. file facebook/rocksdb#24 with seqno 336037 352068
```

Pull Request resolved: facebook/rocksdb#10921

Test Plan: fix the expectation in the existing test of this behavior

Reviewed By: riversand963

Differential Revision: D41046935

Pulled By: ajkr

fbshipit-source-id: 783696bff56115063d5dc5856dfaed6a9881d1ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants