@@ -421,7 +421,20 @@ async fn compaction_correctness_overwrite_chain() -> Result<(), Box<dyn std::err
421421 "scenario={scenario} expected target level 1"
422422 ) ;
423423
424- assert_oracle_matches ( scenario, snapshot_ts, & snapshot, & oracle, & harness. db ) . await ?;
424+ let post_snapshot = harness. db . begin_snapshot ( ) . await ?;
425+ let post_snapshot_ts = post_snapshot. read_view ( ) . read_ts ( ) . get ( ) ;
426+ assert_eq ! (
427+ post_snapshot_ts, snapshot_ts,
428+ "scenario={scenario} expected snapshot ts to be stable across compaction"
429+ ) ;
430+ assert_oracle_matches (
431+ scenario,
432+ post_snapshot_ts,
433+ & post_snapshot,
434+ & oracle,
435+ & harness. db ,
436+ )
437+ . await ?;
425438
426439 Ok ( ( ) )
427440}
@@ -467,7 +480,20 @@ async fn compaction_correctness_delete_heavy() -> Result<(), Box<dyn std::error:
467480 "scenario={scenario} expected target level 1"
468481 ) ;
469482
470- assert_oracle_matches ( scenario, snapshot_ts, & snapshot, & oracle, & harness. db ) . await ?;
483+ let post_snapshot = harness. db . begin_snapshot ( ) . await ?;
484+ let post_snapshot_ts = post_snapshot. read_view ( ) . read_ts ( ) . get ( ) ;
485+ assert_eq ! (
486+ post_snapshot_ts, snapshot_ts,
487+ "scenario={scenario} expected snapshot ts to be stable across compaction"
488+ ) ;
489+ assert_oracle_matches (
490+ scenario,
491+ post_snapshot_ts,
492+ & post_snapshot,
493+ & oracle,
494+ & harness. db ,
495+ )
496+ . await ?;
471497
472498 Ok ( ( ) )
473499}
@@ -521,11 +547,24 @@ async fn compaction_correctness_range_scan_with_deletes() -> Result<(), Box<dyn
521547 "scenario={scenario} expected target level 1"
522548 ) ;
523549
524- assert_oracle_matches ( scenario, snapshot_ts, & snapshot, & oracle, & harness. db ) . await ?;
550+ let post_snapshot = harness. db . begin_snapshot ( ) . await ?;
551+ let post_snapshot_ts = post_snapshot. read_view ( ) . read_ts ( ) . get ( ) ;
552+ assert_eq ! (
553+ post_snapshot_ts, snapshot_ts,
554+ "scenario={scenario} expected snapshot ts to be stable across compaction"
555+ ) ;
556+ assert_oracle_matches (
557+ scenario,
558+ post_snapshot_ts,
559+ & post_snapshot,
560+ & oracle,
561+ & harness. db ,
562+ )
563+ . await ?;
525564 assert_range_matches (
526565 scenario,
527- snapshot_ts ,
528- & snapshot ,
566+ post_snapshot_ts ,
567+ & post_snapshot ,
529568 & oracle,
530569 & harness. db ,
531570 "k02" ,
@@ -587,11 +626,24 @@ async fn compaction_correctness_cross_segment_overlap() -> Result<(), Box<dyn st
587626 "scenario={scenario} expected target level 1"
588627 ) ;
589628
590- assert_oracle_matches ( scenario, snapshot_ts, & snapshot, & oracle, & harness. db ) . await ?;
629+ let post_snapshot = harness. db . begin_snapshot ( ) . await ?;
630+ let post_snapshot_ts = post_snapshot. read_view ( ) . read_ts ( ) . get ( ) ;
631+ assert_eq ! (
632+ post_snapshot_ts, snapshot_ts,
633+ "scenario={scenario} expected snapshot ts to be stable across compaction"
634+ ) ;
635+ assert_oracle_matches (
636+ scenario,
637+ post_snapshot_ts,
638+ & post_snapshot,
639+ & oracle,
640+ & harness. db ,
641+ )
642+ . await ?;
591643 assert_range_matches (
592644 scenario,
593- snapshot_ts ,
594- & snapshot ,
645+ post_snapshot_ts ,
646+ & post_snapshot ,
595647 & oracle,
596648 & harness. db ,
597649 "k01" ,
0 commit comments