Skip to content

Conversation

@jkuradobery
Copy link
Collaborator

No description provided.

Copy link

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

This pull request fixes migration issues for incremental snapshots in the Disk Manager. The core fix ensures that snapshots are only migrated after their base snapshots have been fully migrated, preventing corruption in incremental snapshot chains. This is achieved by adding a check in the migration task to verify base snapshot migration status before proceeding with dependent snapshots.

Key changes:

  • Added dependency checking logic to ensure base snapshots are migrated before incremental snapshots
  • Extended test coverage with a new parameter with_nemesis and comprehensive test for incremental snapshot migration scenarios
  • Modified existing test parametrization to include nemesis testing configuration

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
cloud/disk_manager/internal/pkg/dataplane/migrate_snapshot_database_task.go Implements checkBaseSnapshotIsMigrated function to verify base snapshot migration status before migrating dependent snapshots
cloud/disk_manager/test/snapshot_migration_test/test.py Adds with_nemesis parameter to existing tests and introduces comprehensive test for incremental snapshot chain migration during database migration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Note

This is an automated comment that will be appended during run.

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit 2e5e813.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
9662 9660 0 1 0 1 0

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit 2e5e813.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
45 44 0 1 0 0 0

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit 2e5e813.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
45 44 0 1 0 0 0

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit b60acd4.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
9662 9661 0 0 0 1 0

@jkuradobery jkuradobery added large-tests Launch large tests for PR disk_manager Add this label to run only cloud/disk_manager build and tests on PR labels Dec 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Note

This is an automated comment that will be appended during run.

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit b60acd4.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
1255 1229 0 4 0 22 0

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit b60acd4.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
171 145 0 4 0 22 0

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit b60acd4.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
171 145 0 4 0 22 0

base_snapshot_ids = {}
for record in database_entries:
base_snapshot_ids[record['id']] = record['base_snapshot_id']

Copy link
Collaborator

Choose a reason for hiding this comment

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

А не получится тут ещё проверить, что снапшоты в правильном порядке мигрировали? Скажем, сравнить поле created_at?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Кстати, а чем плохо, если инкрементальный снапшот мигрирует раньше базового?

Copy link
Collaborator Author

@jkuradobery jkuradobery Dec 5, 2025

Choose a reason for hiding this comment

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

А не получится тут ещё проверить, что снапшоты в правильном порядке мигрировали? Скажем, сравнить поле created_at?

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Кстати, а чем плохо, если инкрементальный снапшот мигрирует раньше базового?

Мы мигрируем все снапшоты де-факто как не инкрементальные, гарантия порядка нам дает: 1) что снапшот из диска из которого есть инкрементальные снапшоты возьмет последний чекпоинт.
2) Что цепочка инкрементальности сохранится и в будущем можно будет дописать в миграцию возможность мигрировать инкрементальные снапшоты как инкрементальные. То есть эта правка не настолько критична и мигрировать инкрементальные снапшоты вполне можно и сейчас.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Note

This is an automated comment that will be appended during run.

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit 2699fa8.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
1255 1229 0 4 0 22 0

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit 2699fa8.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
171 145 0 4 0 22 0

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit 2699fa8.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
171 145 0 4 0 22 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disk_manager Add this label to run only cloud/disk_manager build and tests on PR large-tests Launch large tests for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants