pingcap / pingcap/tiflash

Segment merge is too slow to catch up segment split

Open
#6,498 0 comments 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

Currently, we always split a new segment to hold the dtfile of a region snapshot, in the case of adding new TiFlash instances. The number of segments is equal to the regions if the segment merge does not work. But since there is only 1 background thread that runs segment merge, the speed of segment merge fails to catch up with segment split, especially after the configuration of store limit has been increased.

62ebb376-1929-4f05-919c-aa1553c840aa
d959bb3a-134f-4ad2-b798-860e7597260c

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

No file, test, or entry point is named. Start by locating the TiFlash implementation and tests for segment splitting, segment merging, and the single background merge thread; use the reported workload and screenshots to understand the lag. Done should mean segment merge can catch up with segment split under the increased store-limit configuration, with tests or benchmarks showing the improvement.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.