Skip to content

Commit 662da26

Browse files
committed
don't fail on incompatible snapshot
1 parent 4bbbc64 commit 662da26

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

src/workload.rs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,13 +464,29 @@ impl Workload {
464464
}
465465

466466
log::info!("Run: restoring snapshot '{snapshot_name}'");
467-
restore_collection_snapshot(
467+
match restore_collection_snapshot(
468468
&self.collection_name,
469469
snapshot_name,
470470
snapshot.checksum(),
471471
http_client,
472472
)
473-
.await?;
473+
.await
474+
{
475+
Ok(()) => {}
476+
// Snapshots captured during the ephemeral-vector window have a
477+
// schema strict-equality check against the current collection.
478+
// Drop them and move on instead of aborting the chaos test.
479+
Err(Invariant(msg)) if msg.contains("Snapshot is not compatible") => {
480+
log::warn!(
481+
"Skipping snapshot '{snapshot_name}' due to schema \
482+
incompatibility: {msg}"
483+
);
484+
delete_collection_snapshot(client, &self.collection_name, snapshot_name)
485+
.await?;
486+
continue;
487+
}
488+
Err(e) => return Err(e),
489+
}
474490

475491
let restored_count = get_exact_points_count(client, &self.collection_name).await?;
476492

0 commit comments

Comments
 (0)