Skip to content

The lock resolve is slow for p-dml & the progress log of range task may be omitted #1577

Closed
@you06

Description

Phenomenon

From the metrics, the resolve-lock stage of p-dml is very slow.

Image

And the logs does not log the progress every 30 seconds as expected, the range task runner only print the following log.

[2025/02/18 02:25:07.305 +00:00] [INFO] [range_task.go:167] ["range task started"] [name=pipelined-dml-commit-456089876295581703] [startKey=74800000000000007e5f69800000000000000103800000000000000103800000000185fa98] [endKey=74800000000000007e5f728000000005f5e100] [concurrency=8]
[2025/02/18 03:09:28.607 +00:00] [INFO] [range_task.go:276] ["range task finished"] [name=pipelined-dml-commit-456089876295581703] [startKey=74800000000000007e5f69800000000000000103800000000000000103800000000185fa98] [endKey=74800000000000007e5f728000000005f5e100] ["cost time"=44m21.302468224s] ["completed regions"=201]

Analysis

The progress log is print here:

select {
case <-statLogTicker.C:
logutil.Logger(ctx).Info("range task in progress",
zap.String("name", s.identifier),
zap.String("startKey", kv.StrKey(startKey)),
zap.String("endKey", kv.StrKey(endKey)),
zap.Int("concurrency", s.concurrency),
zap.Duration("cost time", time.Since(startTime)),
zap.Int("completed regions", s.CompletedRegions()))
default:
}

However, the progress log may not be printed if there are not such a lot of tasks, and it's waiting here.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions