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

Avoid unnecessary merge #1001

@ShiKaiWi

Description

@ShiKaiWi

Describe This Problem

Currently, merge sort is applied over all the ssts in one specific segment, in order for following dedup procedure. However, what is required by dedup is much less than the global order of all the rows of all the ssts, that is to say, current merge sort is unecessary.

Proposal

What we need for dedup is just to gather all the rows sharing the same primary key in the order of their sequence number. And that is to say, there is no need to do merge sort over the ssts whose key range don't overlap between each other.

Additional Context

No response

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