@@ -1452,31 +1452,38 @@ func TestCompaction(t *testing.T) {
1452
1452
"file_boundaries_delsized" : {
1453
1453
minVersion : FormatDeleteSizedAndObsolete ,
1454
1454
maxVersion : FormatFlushableIngestExcises ,
1455
+ cmp : DefaultComparer ,
1455
1456
},
1456
1457
"set_with_del_sstable_Pebblev4" : {
1457
1458
minVersion : FormatDeleteSizedAndObsolete ,
1458
1459
maxVersion : FormatFlushableIngestExcises ,
1460
+ cmp : DefaultComparer ,
1459
1461
},
1460
1462
"multilevel" : {
1461
1463
minVersion : FormatMinSupported ,
1462
1464
maxVersion : internalFormatNewest ,
1465
+ cmp : DefaultComparer ,
1463
1466
},
1464
1467
"set_with_del_sstable_Pebblev5" : {
1465
1468
minVersion : FormatColumnarBlocks ,
1466
1469
maxVersion : FormatColumnarBlocks ,
1470
+ cmp : DefaultComparer ,
1467
1471
},
1468
1472
"set_with_del_sstable_Pebblev6" : {
1469
1473
minVersion : FormatTableFormatV6 ,
1470
1474
maxVersion : FormatTableFormatV6 ,
1475
+ cmp : DefaultComparer ,
1471
1476
},
1472
1477
"set_with_del_sstable_Pebblev7" : {
1473
1478
minVersion : formatFooterAttributes ,
1474
1479
maxVersion : formatFooterAttributes ,
1480
+ cmp : DefaultComparer ,
1475
1481
},
1476
1482
"value_separation" : {
1477
1483
minVersion : FormatValueSeparation ,
1478
1484
maxVersion : FormatValueSeparation ,
1479
1485
verbose : true ,
1486
+ cmp : DefaultComparer ,
1480
1487
},
1481
1488
"mvcc_garbage_blob" : {
1482
1489
minVersion : FormatValueSeparation ,
@@ -1489,21 +1496,25 @@ func TestCompaction(t *testing.T) {
1489
1496
// since the test prints the compaction log which includes file sizes.
1490
1497
minVersion : formatDeprecatedExperimentalValueSeparation ,
1491
1498
maxVersion : formatDeprecatedExperimentalValueSeparation ,
1499
+ cmp : DefaultComparer ,
1492
1500
},
1493
1501
"compaction_cancellation" : {
1494
1502
// Run at a specific version, so that a single sstable format is used,
1495
1503
// since the test prints the compaction log which includes file sizes.
1496
1504
minVersion : formatDeprecatedExperimentalValueSeparation ,
1497
1505
maxVersion : formatDeprecatedExperimentalValueSeparation ,
1506
+ cmp : DefaultComparer ,
1498
1507
},
1499
1508
"l0_to_lbase_compaction" : {
1500
1509
minVersion : formatDeprecatedExperimentalValueSeparation ,
1501
1510
maxVersion : formatDeprecatedExperimentalValueSeparation ,
1511
+ cmp : DefaultComparer ,
1502
1512
},
1503
1513
"backing_value_size" : {
1504
1514
minVersion : FormatBackingValueSize ,
1505
1515
maxVersion : FormatBackingValueSize ,
1506
1516
verbose : true ,
1517
+ cmp : DefaultComparer ,
1507
1518
},
1508
1519
}
1509
1520
datadriven .Walk (t , "testdata/compaction" , func (t * testing.T , path string ) {
@@ -2767,21 +2778,6 @@ func TestMarkedForCompaction(t *testing.T) {
2767
2778
if testing .Verbose () {
2768
2779
eventListener = TeeEventListener (eventListener , MakeLoggingEventListener (base .DefaultLogger ))
2769
2780
}
2770
- mkOpts := func () * Options {
2771
- opts := & Options {
2772
- FS : vfs .NewMem (),
2773
- DebugCheck : DebugCheckLevels ,
2774
- DisableAutomaticCompactions : true ,
2775
- FormatMajorVersion : internalFormatNewest ,
2776
- EventListener : & eventListener ,
2777
- Logger : testutils.Logger {T : t },
2778
- }
2779
- opts .Experimental .CompactionScheduler = func () CompactionScheduler {
2780
- return NewConcurrencyLimitSchedulerWithNoPeriodicGrantingForTest ()
2781
- }
2782
- opts .WithFSDefaults ()
2783
- return opts
2784
- }
2785
2781
2786
2782
var opts * Options
2787
2783
var d * DB
@@ -2810,11 +2806,18 @@ func TestMarkedForCompaction(t *testing.T) {
2810
2806
2811
2807
case "define" :
2812
2808
if d != nil {
2813
- if err := d .Close (); err != nil {
2814
- return err .Error ()
2815
- }
2809
+ require .NoError (t , d .Close ())
2810
+ }
2811
+ opts = & Options {
2812
+ DebugCheck : DebugCheckLevels ,
2813
+ DisableAutomaticCompactions : true ,
2814
+ FormatMajorVersion : internalFormatNewest ,
2815
+ EventListener : & eventListener ,
2816
+ Logger : testutils.Logger {T : t },
2817
+ }
2818
+ opts .Experimental .CompactionScheduler = func () CompactionScheduler {
2819
+ return NewConcurrencyLimitSchedulerWithNoPeriodicGrantingForTest ()
2816
2820
}
2817
- opts = mkOpts ()
2818
2821
var err error
2819
2822
if d , err = runDBDefineCmd (td , opts ); err != nil {
2820
2823
return err .Error ()
0 commit comments