pingcap / pingcap/tiflash

Optimize merge for empty segment

Open
#5,816 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component/storage type/enhancement
Dominant language
C++
Stars
1k
Forks
423
Avg merge
1d 15h
Merged PRs (30d)
24

Description

Enhancement

It is possible to produce empty segments, when we logical split the range during ingestion.

Currently, merging empty segment with a non-empty segment requires rewriting the stable layer. However, when we are sure that the segment is empty, it can be just merged without any cost.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ingestion logic that logically splits ranges and the merge path handling empty and non-empty segments. Confirm how the stable layer is rewritten today; done means a known-empty segment merges without rewriting that layer, with regression coverage for the empty-segment case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.