Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for 'tools restore' that skips problem rows and continues import if errors occur #10665

Open
s-sabitova opened this issue Oct 21, 2024 · 0 comments
Labels

Comments

@s-sabitova
Copy link

s-sabitova commented Oct 21, 2024

Currently if an error occurs during restore job, the job is stopped and the error is printed to stderr. It's not convenient in case when a large database is being restored, because an error makes it necessary to start the job from the very beginning.

A following flow is suggested: If an error occurs, it's printed to the stderr/log (like described here #10541), the problem row is skipped, and the job continues restoring the following rows.

Additionally, after an object is restored, the number of restored rows vs the number of total rows in the dump should be printed.

This should not be default behavior, because there is a risk of consistency loss if some rows are skipped.

Output example:

Restore started. Total number of objects to restore: 3

Restored cluster/Db1/table1: 100 rows out of 100

Restored cluster/Db1/table2: 200 rows out of 200

Error restoring cluster/Db1/table3, row 234, backup_20241021T122353/table3/data_01.csv
Error: Cannot write data #1

Error restoring cluster/Db1/table3, row 235, backup_20241021T122353/table3/data_01.csv
Error: Cannot write data #1

Restored cluster/Db1/table2: 298 rows out of 300

Job completed with 2 errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant