Skip to content

Commit 77a17d0

Browse files
committed
adapter: turmoil chaos test for builtin schema migrations
This commit adds a turmoil-based chaos test for builtin schema migrations. It spawns a bunch of processes at different versions, defines some random builtin schema changes, and then performs migrations through all versions. For added chaos, process are randomly restarted all the time.
1 parent 67d0ac5 commit 77a17d0

File tree

5 files changed

+414
-3
lines changed

5 files changed

+414
-3
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/adapter/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ workspace-hack = { version = "0.0.0", path = "../workspace-hack", optional = tru
103103
[dev-dependencies]
104104
criterion = { version = "0.6.0", features = ["async_tokio"] }
105105
datadriven = "0.8.0"
106+
mz-persist = { path = "../persist", features = ["turmoil"] }
107+
mz-persist-client = { path = "../persist-client", features = ["turmoil"] }
108+
turmoil = "0.7.0"
106109

107110
[[bench]]
108111
name = "catalog"

src/adapter/src/catalog/open/builtin_schema_migration.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ impl MigrationRunResult {
320320
}
321321

322322
/// Information about a system object required to run a `Migration`.
323+
#[derive(Clone, Debug)]
323324
struct ObjectInfo {
324325
global_id: GlobalId,
325326
shard_id: Option<ShardId>,
@@ -1152,3 +1153,7 @@ mod migration_shard {
11521153
}
11531154
}
11541155
}
1156+
1157+
#[cfg(test)]
1158+
#[path = "builtin_schema_migration_tests.rs"]
1159+
mod tests;

0 commit comments

Comments
 (0)