pingcap / pingcap/tidb-binlog

Optimize DELETE performance for range deletion

Open
#1,055 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
Go
Stars
291
Forks
131
Avg merge
5m
Merged PRs (30d)
2

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

Range deletion is being translated into multiple single deletion SQL in the drainer. The overhead could be huge, and they slow down the synchronization.

  1. What did you expect to see?

For this case, the drainer should be able to understand range deletion or able to optimize multiple single deletion.

  1. What did you see instead?

  2. Please provide the relate downstream type and version of drainer.
    (run drainer -V in terminal to get drainer's version)

Contributor guide

Open the contributing guide

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 drainer code that translates range deletions into SQL and inspect how multiple single-delete statements are generated. Define the optimization approach from the existing behavior, then verify that range deletions no longer create excessive single-delete SQL and that synchronization overhead is reduced.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data-engineering, distributed-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.