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

Restore improvement: compaction #4060

Merged
merged 4 commits into from
Oct 8, 2024
Merged

Conversation

Michal-Leszczynski
Copy link
Collaborator

This PR adds new boolean restore flag --allow-compaction (false by default).
When it's set to false, SM disables auto compactions on restored tables for the time of the restore and enables them back when its done.

Fixes #3953

@Michal-Leszczynski Michal-Leszczynski marked this pull request as ready for review October 8, 2024 11:04
@Michal-Leszczynski
Copy link
Collaborator Author

@karol-kokoszka This PR is ready for review!

Copy link
Collaborator

@karol-kokoszka karol-kokoszka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update docs

  • one question related to the channel buffer.

docs/source/sctool/partials/sctool_restore.yaml Outdated Show resolved Hide resolved
docs/source/sctool/partials/sctool_restore_update.yaml Outdated Show resolved Hide resolved
pkg/command/restore/res.yaml Outdated Show resolved Hide resolved
pkg/service/restore/restore_integration_test.go Outdated Show resolved Hide resolved
This commit add TestRestoreTablesPreparationIntegration.
Its purpose is to check setup changes performed by SM during
restore data stage. Right now it validates tombstone_gc mode
and compaction, but it can be easily extended in the future.
Test scenario:
- Run restore - hang on restore data stage
- Validate setup
- Pause restore
- Validate setup
- Resume restore - hang on restore data stage
- Validate setup
- Resume restore - wait for success
- Validate setup
- Validate restore success
…tegration

This check isn't implemented correctly, as starting from 27b1d23,
file names are not stored in the SM DB. It means that 'sfs' was
always empty.
Nevertheless, the partial upload check could still fail when
's3f' was empty as well. This test does not implement any breakpoint
to ensure that backup is paused after transferring at least a single file
(it just waits for the transfers to start).
That's why this check was flaky and didn't do anything meaningful,
so it is removed from the test.
@Michal-Leszczynski
Copy link
Collaborator Author

@karol-kokoszka I addressed the comments, could you take a look again?

Copy link
Collaborator

@karol-kokoszka karol-kokoszka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Please squash and merge.

@Michal-Leszczynski Michal-Leszczynski merged commit 9fb5be9 into master Oct 8, 2024
52 checks passed
@Michal-Leszczynski Michal-Leszczynski deleted the ml/restore-compaction branch October 8, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable compaction during restore
2 participants