Skip to content

IGNITE-29267 Fix flaky SnapshotCompatibilityTest#testSnapshotRestore - #13808

Open
NSAmelchev wants to merge 1 commit into
apache:masterfrom
NSAmelchev:ignite-29267
Open

NSAmelchev wants to merge 1 commit into
apache:masterfrom
NSAmelchev:ignite-29267

Conversation

@NSAmelchev

Copy link
Copy Markdown
Contributor

SnapshotCompatibilityTest#testSnapshotRestore is flaky: a snapshot restore started right after the cluster activation fails with "Cache group restore operation was rejected. The cluster should be active."

IgniteCluster#state returns when all nodes have finished the state change exchange, but the local cluster state stays in transition until ChangeGlobalStateFinishMessage is processed. SnapshotRestoreProcess#start checked the transition flag in the caller's thread and rejected the operation.

The transition check is removed from SnapshotRestoreProcess#start. The cluster state is validated again on the prepare phase, which is ordered with the finish message by discovery, so the restore is still rejected if the state change is not finished by then.

Behavior change: in that case the restore is rejected with the same message on the prepare phase, i.e. after the snapshot check, instead of immediately.

The workaround for the same race is removed from IgniteClusterSnapshotRestoreSelfTest#testUserClassRestored.

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.

1 participant