Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Rdb_iterator_base::next_with_direction: too many compares for eof check #1438

Description

@rockeet

in Rdb_iterator_base::next_with_direction, it checks prefix and lower bound and upper bound, this consuming too many cpu in our cases, when running tpcc, the flame graph showing these 3 compare takes up to 3% cpu time, which is ~10% of myrocks::Rdb_iterator_base::next_with_direction.

MyRocks use [Reverse]BytewiseComparator, so the optimal should be just 1 compare in scanning, I have tried to improve this way, it is ok in most cases but failed some mtr tests. I am expecting an official fix for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions