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

Dose rocksdb have the bug found in leveldb? #993

Closed
strrchr opened this issue Feb 16, 2016 · 7 comments
Closed

Dose rocksdb have the bug found in leveldb? #993

strrchr opened this issue Feb 16, 2016 · 7 comments

Comments

@strrchr
Copy link

strrchr commented Feb 16, 2016

Dose rocksdb have the bug found in leveldb?

Compaction causes data inconsistency when using snapshots
google/leveldb#320

@igorcanadi
Copy link
Collaborator

Thanks for the report. I ported the test from #339 PR and the tests pass (https://reviews.facebook.net/D54225). That doesn't mean we don't have a bug, though. I'll look a bit more into this.

@igorcanadi
Copy link
Collaborator

I just read the issue more throughly. RocksDB doesn't have the same bug. Looks like we actually found and fixed that bug years ago. I don't know why we didn't contribute back to LevelDB :(

The function that avoids the mistake in RocksDB code is ExpandWhileOverlapping:

bool CompactionPicker::ExpandWhileOverlapping(const std::string& cf_name,

@igorcanadi
Copy link
Collaborator

Thanks for the report, though! I will close this issue now.

@siying
Copy link
Contributor

siying commented Feb 16, 2016

It does feel a valid bug in RocksDB. @igorcanadi if we always expand while overlapping, how come we had this bug? https://reviews.facebook.net/D51783

@igorcanadi
Copy link
Collaborator

So we fail to call ExpandWhileOverlapping()? If yes, then this is a valid bug.

@siying
Copy link
Contributor

siying commented Feb 16, 2016

@igorcanadi you are right. I didn't find a place ExpandWhileOverlapping() fails to be called, and I'm not able to come up with a unit test that repros the issue.

@franksunjin
Copy link

I read ExpandWhileOverlapping, it is the same logic of the bugfix in google/leveldb#339

And the unit test pass, should able to resolve this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants