Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,12 @@ void testRestore(@TempDir Path snapshotKvTabletDirPath) throws Exception {

// We have to remove the first scheduled snapshot task since it's for the previous kv tablet
// whose rocksdb has been dropped.

// Remove the stale snapshot task if it exists
scheduledExecutorService.removeNonPeriodicScheduledTask();
// Trigger snapshot with retry to avoid flakiness
triggerSnapshotTaskWithRetry(scheduledExecutorService, 5);

// trigger one snapshot,
scheduledExecutorService.triggerNonPeriodicScheduledTask();
// wait until the snapshot success
kvSnapshotStore.waitUntilSnapshotComplete(tableBucket, 0);

Expand All @@ -717,7 +719,9 @@ void testRestore(@TempDir Path snapshotKvTabletDirPath) throws Exception {
short newSchemaId = 2;
// trigger one snapshot.
scheduledExecutorService.removeNonPeriodicScheduledTask();
scheduledExecutorService.triggerNonPeriodicScheduledTask();

triggerSnapshotTaskWithRetry(scheduledExecutorService, 5);

// wait until the snapshot success
kvSnapshotStore.waitUntilSnapshotComplete(tableBucket, 1);
// write data with old schema
Expand Down