File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -1286,6 +1286,35 @@ where
1286
1286
. send ( BackgroundCmd :: DowngradeSince ( persist_compaction_commands) )
1287
1287
. expect ( "cannot fail to send" ) ;
1288
1288
}
1289
+
1290
+ // Assert table invariants
1291
+ for ( id, state) in & * collections {
1292
+ match & state. description . data_source {
1293
+ DataSource :: Table {
1294
+ primary : Some ( mut primary_id) ,
1295
+ } => {
1296
+ let primary = loop {
1297
+ let primary = collections. get ( & primary_id) . expect ( "must still exist" ) ;
1298
+ if let DataSource :: Table {
1299
+ primary : Some ( other) ,
1300
+ } = & primary. description . data_source
1301
+ {
1302
+ primary_id = * other;
1303
+ } else {
1304
+ break primary;
1305
+ }
1306
+ } ;
1307
+ assert ! (
1308
+ PartialOrder :: less_equal(
1309
+ & primary. read_capabilities. frontier( ) ,
1310
+ & state. read_capabilities. frontier( ) ,
1311
+ ) ,
1312
+ "primary ({primary_id}) since must be held back at least as much as secondary ({id})"
1313
+ )
1314
+ }
1315
+ _ => { }
1316
+ }
1317
+ }
1289
1318
}
1290
1319
1291
1320
/// Remove any shards that we know are finalized
You can’t perform that action at this time.
0 commit comments