-
Notifications
You must be signed in to change notification settings - Fork 40
refactor(1-1-restore): refactors 1-1-restore progress #4348
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
base: 1-1-restore-feature-branch
Are you sure you want to change the base?
refactor(1-1-restore): refactors 1-1-restore progress #4348
Conversation
8c15d92
to
04922ec
Compare
c5bf399
to
f10f9f7
Compare
@VAveryanov8 please pull from the feature branch (or |
f10f9f7
to
d664493
Compare
This refactors 1-1-restore progress by making following changes: - include `nodetool refresh` into table progress - only track progress of table/view restore - removes unnecessary stats (shard_count, host bandwidth, aggregation by host, keyspaces). These stats is better to keep in metrics or calculate on the client side. Refs: #4205
b4d31b3
to
ca6e046
Compare
This introduces "failed" status for the ProgressStatus, which is used only if table/view restore ended with error.
ca6e046
to
c2f8135
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.
Copilot reviewed 39 out of 51 changed files in this pull request and generated no comments.
Files not reviewed (12)
- pkg/service/one2onerestore/testdata/1.run_table_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/1.run_view_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/2.run_table_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/2.run_view_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/3.run_table_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/3.run_view_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/4.run_table_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/4.run_view_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/5.run_table_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/5.run_view_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/6.run_table_progress.json: Language not supported
- pkg/service/one2onerestore/testdata/6.run_view_progress.json: Language not supported
Comments suppressed due to low confidence (3)
pkg/service/one2onerestore/progress.go:296
- The mergeProgressStatus function returns 'in_progress' when merging differing statuses (except if one is 'failed'). Please verify that this behavior is intended for cases where one progress might already be 'done'.
func mergeProgressStatus(dst, src ProgressStatus) ProgressStatus {
pkg/service/one2onerestore/model.go:75
- [nitpick] Consider renaming 'scyllaTableWithSize' to a more descriptive name such as 'tableToRestore' to clarify its role in tracking table sizes for restoration.
tablesToRestore []scyllaTableWithSize
pkg/service/one2onerestore/progress.go:9
- [nitpick] Consider renaming the alias 'stderr' for the standard errors package to something more descriptive like 'stdErrors' to avoid potential confusion.
stderr "errors"
This refactors 1-1-restore progress to address code review comments from #4296 by making following changes:
nodetool refresh
into table progresshost, keyspaces). These stats are better to keep in metrics or
calculate on the client side.
Now getProgress api response will have following structure:
status
field is introduced to better cover cases when we can't say if restore operation of table/view is complete just by looking atsize
andrestored
, because for tables we need to wait until nodetool refresh is complete and for views - until view rebuild operation is complete.Refs: #4205
Please make sure that: