Skip to content

Key with larger sequence got compacted to elder level, while its smaller sequence incarnation stays in younger level #376

@kezhuw

Description

@kezhuw

DBImpl::DoCompactionWork decides to finish current output if current output file is big enough or has too much overlap with its grandparents. Seems that keys with same user key but different sequence part may spread to multiple output files in compaction. If this happens, new level compaction may pick the file with newer version key and compact it to elder level. From now on, the key's newer version, which has larger sequence number, is stored in level greater than its old incarnation. If we try to get that key, we will get its old incarnation. See Version::Get for implementation details.

I push a pull request #375 to fix this. Any maintainer here to review that pull request ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions