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

Populate RecoveryState details for shallow snapshot restore #15434

Closed
ltaragi opened this issue Aug 27, 2024 · 0 comments · Fixed by #15353
Closed

Populate RecoveryState details for shallow snapshot restore #15434

ltaragi opened this issue Aug 27, 2024 · 0 comments · Fixed by #15353
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request Storage:Snapshots v2.17.0

Comments

@ltaragi
Copy link
Contributor

ltaragi commented Aug 27, 2024

Is your feature request related to a problem? Please describe

  • In a regular active recovery, the recovery stats for the _cat/recovery call are populated as
index | shard | time | type | stage | source_host | source_node | target_host | target_node | repository | snapshot | files | files_recovered | files_percent | files_total | bytes | bytes_recovered | bytes_percent | bytes_total | translog_ops | translog_ops_recovered | translog_ops_percent
movies | 0 | 117ms | empty_store | done | n/a | n/a | 172.18.0.4 | odfe-node1 | n/a | n/a | 0 | 0 | 0.0% | 0 | 0 | 0 | 0.0% | 0 | 0 | 0 | 100.0%
movies | 0 | 382ms | peer | done | 172.18.0.4 | odfe-node1 | 172.18.0.3 | odfe-node2 | n/a | n/a | 1 | 1 |  100.0% | 1 | 208 | 208 | 100.0% | 208 | 1 | 1 | 100.0%
  • In case of restoration of shallow snapshots, these functions are never called and the stats are not populated and returned as 0. We should correctly populate the stats in this case too.

Describe the solution you'd like

  • Information like bytes_recovered, bytes_total, etc. is obtained from the ReplicationLuceneIndex object of the RecoveryState for the shard being recovered
  • ReplicationLuceneIndex gets this data with addFileDetail() and addRecoveredBytesToFile() as and when these are called during the restore flow
  • Populating these stats correctly for restoration from shallow snapshots should return the required data in _cat/recovery response

Related component

Storage:Snapshots

Describe alternatives you've considered

No response

Additional context

No response

@ltaragi ltaragi added enhancement Enhancement or improvement to existing feature or request Storage:Snapshots labels Aug 27, 2024
@ltaragi ltaragi self-assigned this Aug 27, 2024
@ltaragi ltaragi removed the untriaged label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Storage:Snapshots v2.17.0
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant