pingcap / pingcap/tiflash

When deleting the entire segment, skip reading the entire segment when ensurePlace

Open
#6,742 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

In ensurePlace, if the entire segment is deleted, it will read the entire segment to place delete. I think we can skip this read since the entire segment is deleted.
After setting the region size to 1 GiB by default, it is common for delete range to delete the entire segment.

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 in dbms/src/Storages/DeltaMerge/Segment.cpp at ensurePlace, around line 2223, and trace how the entire-segment deletion case is identified. Confirm the existing delete-range behavior and determine how to avoid reading the segment in that case. Done means the entire segment can be deleted without the unnecessary full-segment read.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.