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

Make restore progress available even when cluster is not #4196

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Michal-Leszczynski
Copy link
Collaborator

This PR makes sure that restore progress is available even when the cluster is no longer available.
Previously, view build status wasn't saved into the SM DB and was queried when fetching progress,
which resulted in failure when the cluster was not available.

Sctool progress display
miles@fedora:~/scylla-manager$ ./sctool.dev progress -c myc restore/cb2a069d-dbde-4b36-85c3-8d2b28dc2320
Restore progress
Run:            d9f7d8a6-cf4e-11ef-9526-0892040e83bb
Status:         DONE
Start time:     10 Jan 25 13:31:44 CET
End time:       10 Jan 25 13:33:04 CET
Duration:       1m20s
Progress:       100% | 100%
Snapshot Tag:   sm_20250110121943UTC
Bandwidth:
  - Download:    219.944KiB/s/shard
  - Load&stream: 609B/s/shard

╭───────────────────────────────────────────┬─────────────┬────────────┬────────────┬────────────┬────────╮
│ Keyspace                                  │    Progress │       Size │    Success │ Downloaded │ Failed │
├───────────────────────────────────────────┼─────────────┼────────────┼────────────┼────────────┼────────┤
│ system_distributed                        │ 100% | 100% │ 103.107KiB │ 103.107KiB │ 103.107KiB │     0B │
│ progress_28ecadfdcf4d11ef86910892040e83bb │ 100% | 100% │   5.105KiB │   5.105KiB │   5.105KiB │     0B │
│ system_traces                             │        100% │         0B │         0B │         0B │     0B │
╰───────────────────────────────────────────┴─────────────┴────────────┴────────────┴────────────┴────────╯

Post-restore repair progress
Run:            
Status:         DONE
Start time:     10 Jan 25 13:32:37 CET
End time:       10 Jan 25 13:32:38 CET
Duration:       0s
Progress:       100%
Intensity:      0
Parallel:       0
Datacenters:    
  - dc1
  - dc2

╭────────────────────┬────────────────────────┬──────────┬──────────╮
│ Keyspace           │                  Table │ Progress │ Duration │
├────────────────────┼────────────────────────┼──────────┼──────────┤
│ system_distributed │      view_build_status │ 100%     │ 1s       │
├────────────────────┼────────────────────────┼──────────┼──────────┤
│ system_traces      │                 events │ 100%     │ 1s       │
│ system_traces      │          node_slow_log │ 100%     │ 1s       │
│ system_traces      │ node_slow_log_time_idx │ 100%     │ 1s       │
│ system_traces      │               sessions │ 100%     │ 1s       │
│ system_traces      │      sessions_time_idx │ 100%     │ 1s       │
╰────────────────────┴────────────────────────┴──────────┴──────────╯

Restored views
View: progress_28ecadfdcf4d11ef86910892040e83bb.mv_2b3e64aacf4d11ef86930892040e83bb, Status: SUCCESS

Fixes #4191

We need to store view build status because we want
to display it during in sctool progress.

Ref #4191
Since build status is a part of the view definition
in SM DB schema, we should also reflect it in the code.
This also allows us to get rid of the ViewProgress struct.
… in progress

This way there is no problem with getting sctool progress
even when the cluster is no longer available.
This makes TestRestoreTablesProgressIntegration pass.

Fixes #4191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant