-
Notifications
You must be signed in to change notification settings - Fork 34
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
Restore: rely on run.units instead of target.keyspace #4040
Conversation
…ting over manifests Target.keyspace is calculated at the beginning of each restore task run. It is vulnerable for changes occurring during restore process, e.g.: - restore targeting some views is started - target.keyspace excludes restored views (checked via CQL query) - restore is paused - restore is resumed - recalculated target.keyspace no longer excludes restored views Units are calculated only once at the beginning of the restore, so they are not vulnerable to mentioned changes and should be used to determine which tables should be restored. Fixes #4037
6bd0a7a
to
1dd041d
Compare
@karol-kokoszka This PR is ready for review! |
@karol-kokoszka Could you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few questions.
@karol-kokoszka The first round of comments has been addressed! |
This commit adds runPausedRestore function which allows to run restore which is going to be interrupted every specified interval. Pausing after some arbitrary amount of time might seem flaky, but we can't always rely on scyllaclient hooks for pausing restore, as we are biased to where we put them. This commit also alters runPausedRestore to include views in schema and the backup, so that it can test for #4037.
1dd041d
to
85bb35e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks !
Target.keyspace is calculated at the beginning of each restore task run.
It is vulnerable for changes occurring during restore process, e.g.:
Units are calculated only once at the beginning of the restore,
so they are not vulnerable to mentioned changes and should
be used to determine which tables should be restored.
Fixes #4037