tidb-lightning
tidb-lightning copied to clipboard
Better progress updates
Feature Request
Is your feature request related to a problem? Please describe:
A large restore today can appear to get "stuck" in some phases, especially "post-processing", where it's possible to see dozens of messages like this over the course of an hour or more:
[2020/11/02 21:53:58.838 +00:00] [INFO] [restore.go:625] [progress] [files="14940/14940 (100.0%)"] [tables="2/3 (66.7%)"] [chunks=14940/14940] [speed(MiB/s)=141.12999972982269] [state=post-processing] []
Describe the feature you'd like: We should find better ways to communicate incremental progress information for every phrase of restore.
We are planning to take two steps to optimize the progress log:
- Short term optimization. for local backend, add progress for import phase something like
[import=66GB/100GB(66%)]
. - Long term optimization. We will optimize lightning concurrent model to make restore and importer run in pipeline better to avoid the long tail import phase. After this optimization, the current progress will accurately repression the total progress.
@kennytm @Little-Wallace @overvenus PTAL