pingcap / pingcap/tidb

make `br debug checksum` multi-threaded

Open
#60,311 1 comment 1 reaction 0 assignees View on GitHub
component/br type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

Currently `br debug checksum` runs the checksum comparison in a single thread. For a huge archive with many SST files this may not be able to utilize all resources.

https://github.com/pingcap/tidb/blob/95181316d58ba47092567c115fb5734e02a19ef0/br/cmd/br/debug.go#L90-L96

There should be a `--concurrency` flag to run multiple hashsum checks in parallel.

Contributor guide

Open the contributing guide

Research direction

Start at br/cmd/br/debug.go around lines 90-96 and trace how `br debug checksum` performs its checksum comparison. Check the command's existing flag setup and identify how the SST files are enumerated before deciding where concurrency belongs. Done means the command accepts `--concurrency` and runs multiple hashsum checks in parallel for large archives.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.