Skip to content

Add tests with reboots for incremental backups #21534

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

Merged
merged 4 commits into from
Jul 24, 2025

Conversation

pixcc
Copy link
Member

@pixcc pixcc commented Jul 23, 2025

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

PR добавляет 8 тест‑кейсов, проверяющих устойчивость инкрементальных бекапов к рестартам:

Новые тест-кейсы для бекап коллекции:

  • BackupBackupCollectionWithReboots - полный бэкап коллекции переживает рестарты
  • BackupIncrementalBackupCollectionWithReboots - инкрементальный бекап коллекции переживает рестарты
  • BackupCycleBackupCollectionWithReboots - два цикла «full + 2 incremental» подряд при перезапусках
  • BackupCycleMultiTableBackupCollectionWithReboots - два цикла «full + 2 incremental» подряд при перезапусках, но для коллекции из двух таблиц
  • BackupCycleWithDataBackupCollectionWithReboots - два цикла «full + 2 incremental» подряд при перезапусках, но вместе с загрузкой данных в таблицу

Новые тест-кейсы отдельно для continuous-backup-стрима:

  • Basic - Create → Stop → Drop на continuous-backup-стриме с рестартами
  • TakeIncrementalBackup - ротация стримов и offload одного стрима в инкрементальную таблицу с рестартами
  • TakeSeveralIncrementalBackups - каскад из трёх ротаций стримов и offload в инкрементальную таблицу с рестартами

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds reboot testing for incremental backup functionality to ensure robustness during system restarts. The implementation creates a new test suite specifically for continuous backups with system reboots and extends existing backup collection tests with incremental backup scenarios.

  • Adds new continuous backup reboot test suite with core operations (create, alter, drop)
  • Implements reboot testing for incremental backup scenarios including single and multiple backups
  • Extends backup collection tests with incremental backup configurations and multi-table scenarios

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ydb/core/tx/schemeshard/ya.make Adds the new continuous backup reboots test directory to the build
ydb/core/tx/schemeshard/ut_helpers/ls_checks.h Declares new ExtractChildren helper function for test validation
ydb/core/tx/schemeshard/ut_helpers/ls_checks.cpp Implements ExtractChildren function to extract child path names
ydb/core/tx/schemeshard/ut_continuous_backup_reboots/ya.make Creates build configuration for the new continuous backup reboots test suite
ydb/core/tx/schemeshard/ut_continuous_backup_reboots/ut_continuous_backup_reboots.cpp Implements comprehensive reboot tests for continuous backup operations
ydb/core/tx/schemeshard/ut_backup_collection_reboots/ut_backup_collection_reboots.cpp Extends backup collection tests with incremental backup scenarios and multi-table support
Comments suppressed due to low confidence (1)

ydb/core/tx/schemeshard/ut_continuous_backup_reboots/ut_continuous_backup_reboots.cpp:16

  • [nitpick] The test suite name 'TContinuousBackupWithRebootsTests' is inconsistent with the file name pattern. Consider using 'TContinuousBackupRebootsTests' to match the directory name 'ut_continuous_backup_reboots'.
Y_UNIT_TEST_SUITE(TContinuousBackupWithRebootsTests) {

Copy link

github-actions bot commented Jul 23, 2025

🟢 2025-07-23 18:04:59 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented Jul 23, 2025

2025-07-23 11:22:39 UTC Pre-commit check linux-x86_64-release-asan for 02480c3 has started.
2025-07-23 11:22:52 UTC Artifacts will be uploaded here
2025-07-23 11:25:25 UTC ya make is running...
🟡 2025-07-23 12:11:13 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
2369 2294 0 7 66 2

🟢 2025-07-23 12:11:34 UTC Build successful.

Copy link

github-actions bot commented Jul 23, 2025

2025-07-23 11:29:26 UTC Pre-commit check linux-x86_64-relwithdebinfo for 02480c3 has started.
2025-07-23 11:29:39 UTC Artifacts will be uploaded here
2025-07-23 11:32:23 UTC ya make is running...
🟢 2025-07-23 12:00:56 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3370 3370 0 0 0 0

🟢 2025-07-23 12:01:20 UTC Build successful.

@pixcc pixcc marked this pull request as ready for review July 23, 2025 12:49
@pixcc pixcc requested a review from a team as a code owner July 23, 2025 12:49
@pixcc pixcc requested review from CyberROFL and Enjection July 23, 2025 12:49
Copy link

github-actions bot commented Jul 23, 2025

2025-07-23 14:04:15 UTC Pre-commit check linux-x86_64-relwithdebinfo for c630a16 has started.
2025-07-23 14:04:39 UTC Artifacts will be uploaded here
2025-07-23 14:07:44 UTC ya make is running...
🟢 2025-07-23 14:21:26 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3372 3372 0 0 0 0

🟢 2025-07-23 14:21:52 UTC Build successful.

Copy link

github-actions bot commented Jul 23, 2025

2025-07-23 14:05:57 UTC Pre-commit check linux-x86_64-release-asan for c630a16 has started.
2025-07-23 14:06:11 UTC Artifacts will be uploaded here
2025-07-23 14:09:01 UTC ya make is running...
🟡 2025-07-23 14:31:26 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
2369 2278 0 14 75 2

🟢 2025-07-23 14:31:46 UTC Build successful.

@pixcc pixcc enabled auto-merge (squash) July 23, 2025 15:47
t.TestEnv->TestWaitNotification(runtime, txId);
}

TestCreateContinuousBackup(runtime, ++txId, "/MyRoot", R"(
Copy link
Member

Choose a reason for hiding this comment

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

Если такой многоступенчатый тест укладывается в таймаут, то хорошо. Но обычно мы стараемся тесты с ребутами делать максимально точечными, т.к. иначе в них возникает слишком много комбинаций для перебора.

@pixcc pixcc merged commit 1c54822 into ydb-platform:main Jul 24, 2025
14 checks passed
maVovk pushed a commit to maVovk/ydb that referenced this pull request Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle restarts gracefully in incremental backup & restore: add tests with reboots
2 participants