This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Add progress for each partition in SHOW PROCESSLIST #855
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a proposal to add some more information to the
SHOW PROCESSLIST
output.It adds a counter for each active partition. A partition gets removed from the list when it finishes.
This is how it looks:
The new output can be used to notice when for some reason a repository takes more time than others to finish.
Because there aren't totals, the counter of each partition cannot be used to get an estimate of the progress made. Right now its only function is to let the user know that the iterator is working.
I am concerned with the
onNext
function, because I'm not sure if updating the progress for every row will have an impact on performance. I'm working on testing this, but so fargitbase-regression
has been giving me unreliable times.If we removed
onNext
we could still benefit from having the name of the active partitions, maybe with a(?/?)
progress.Another generic improvement would be to have a way to get the total number of rows for a table. Maybe implementing a new interface. I didn't explore this possibility because as far as I know in gitbase we won't be able to use this. But it may be an interesting generic addition later for go-mysql-server itself.