File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -3021,6 +3021,17 @@ func TestCompactionCorruption(t *testing.T) {
30213021 return ! hasExternalFiles (d )
30223022 })
30233023
3024+ case "manual-compaction" :
3025+ if err := d .Compact ([]byte ("a" ), []byte ("z9999999" ), true /* parallelize */ ); err != nil {
3026+ td .Fatalf (t , "manual compaction failed: %s" , err )
3027+ }
3028+ v := d .DebugCurrentVersion ()
3029+ for i := 0 ; i < numLevels - 1 ; i ++ {
3030+ if v .Levels [i ].Len () > 0 {
3031+ td .Fatalf (t , "expected no tables on L%d" , i )
3032+ }
3033+ }
3034+
30243035 default :
30253036 return fmt .Sprintf ("unknown command: %s" , td .Cmd )
30263037 }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ y#0,SET = yvalue
1616z#0,SET = zvalue
1717----
1818
19- ingest-external file1
19+ ingest-external
2020file1 bounds=(a,c0)
2121file2 bounds=(d,w0)
2222file3 bounds=(x,z0)
@@ -46,3 +46,29 @@ expire-spans
4646# files.
4747wait-for-no-external-files
4848----
49+
50+ build-remote file4-not-there
51+ a#0,SET = avalue
52+ u#0,SET = uvalue
53+ z#0,SET = zvalue
54+ ----
55+
56+ ingest-external
57+ file4 bounds=(a,z0)
58+ ----
59+
60+ # Verify that a problem span is set.
61+ wait-for-problem-span
62+ ----
63+
64+ stop-workload
65+ ----
66+
67+ # Make file4 appear.
68+ move-remote-object file4-not-there file4
69+ ----
70+ file4-not-there -> file4
71+
72+ # Verify that a manual compaction goes through despite the problem span.
73+ manual-compaction
74+ ----
You can’t perform that action at this time.
0 commit comments