@@ -21,7 +21,7 @@ import (
21
21
func TestClientOperations (t * testing.T ) {
22
22
dbFile := filepath .Join (t .TempDir (), "my_db" )
23
23
24
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
24
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
25
25
require .NoError (t , err )
26
26
t .Cleanup (func () {
27
27
require .NoError (t , client .Close (context .TODO ()))
@@ -59,7 +59,7 @@ func TestClientBatchOperations(t *testing.T) {
59
59
tempDir := t .TempDir ()
60
60
dbFile := filepath .Join (tempDir , "my_db" )
61
61
62
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
62
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
63
63
require .NoError (t , err )
64
64
t .Cleanup (func () {
65
65
require .NoError (t , client .Close (context .TODO ()))
@@ -180,7 +180,7 @@ func TestNewClientTransactionErrors(t *testing.T) {
180
180
tempDir := t .TempDir ()
181
181
dbFile := filepath .Join (tempDir , "my_db" )
182
182
183
- client , err := newClient (zap .NewNop (), dbFile , timeout , & CompactionConfig {})
183
+ client , err := newClient (zap .NewNop (), dbFile , timeout , & CompactionConfig {}, false )
184
184
require .NoError (t , err )
185
185
t .Cleanup (func () {
186
186
require .NoError (t , client .Close (context .TODO ()))
@@ -204,7 +204,7 @@ func TestNewClientErrorsOnInvalidBucket(t *testing.T) {
204
204
tempDir := t .TempDir ()
205
205
dbFile := filepath .Join (tempDir , "my_db" )
206
206
207
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
207
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
208
208
require .Error (t , err )
209
209
require .Nil (t , client )
210
210
@@ -259,7 +259,7 @@ func TestClientReboundCompaction(t *testing.T) {
259
259
CheckInterval : checkInterval ,
260
260
ReboundNeededThresholdMiB : testCase .reboundNeededThresholdMiB ,
261
261
ReboundTriggerThresholdMiB : testCase .reboundTriggerThresholdMiB ,
262
- })
262
+ }, false )
263
263
require .NoError (t , err )
264
264
t .Cleanup (func () {
265
265
require .NoError (t , client .Close (context .TODO ()))
@@ -348,7 +348,7 @@ func TestClientConcurrentCompaction(t *testing.T) {
348
348
CheckInterval : stepInterval * 2 ,
349
349
ReboundNeededThresholdMiB : 1 ,
350
350
ReboundTriggerThresholdMiB : 5 ,
351
- })
351
+ }, false )
352
352
require .NoError (t , err )
353
353
354
354
t .Cleanup (func () {
@@ -408,7 +408,7 @@ func BenchmarkClientGet(b *testing.B) {
408
408
tempDir := b .TempDir ()
409
409
dbFile := filepath .Join (tempDir , "my_db" )
410
410
411
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
411
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
412
412
require .NoError (b , err )
413
413
b .Cleanup (func () {
414
414
require .NoError (b , client .Close (context .TODO ()))
@@ -428,7 +428,7 @@ func BenchmarkClientGet100(b *testing.B) {
428
428
tempDir := b .TempDir ()
429
429
dbFile := filepath .Join (tempDir , "my_db" )
430
430
431
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
431
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
432
432
require .NoError (b , err )
433
433
b .Cleanup (func () {
434
434
require .NoError (b , client .Close (context .TODO ()))
@@ -451,7 +451,7 @@ func BenchmarkClientSet(b *testing.B) {
451
451
tempDir := b .TempDir ()
452
452
dbFile := filepath .Join (tempDir , "my_db" )
453
453
454
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
454
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
455
455
require .NoError (b , err )
456
456
b .Cleanup (func () {
457
457
require .NoError (b , client .Close (context .TODO ()))
@@ -471,7 +471,7 @@ func BenchmarkClientSet100(b *testing.B) {
471
471
tempDir := b .TempDir ()
472
472
dbFile := filepath .Join (tempDir , "my_db" )
473
473
474
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
474
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
475
475
require .NoError (b , err )
476
476
b .Cleanup (func () {
477
477
require .NoError (b , client .Close (context .TODO ()))
@@ -493,7 +493,7 @@ func BenchmarkClientDelete(b *testing.B) {
493
493
tempDir := b .TempDir ()
494
494
dbFile := filepath .Join (tempDir , "my_db" )
495
495
496
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
496
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
497
497
require .NoError (b , err )
498
498
b .Cleanup (func () {
499
499
require .NoError (b , client .Close (context .TODO ()))
@@ -519,7 +519,7 @@ func BenchmarkClientSetLargeDB(b *testing.B) {
519
519
tempDir := b .TempDir ()
520
520
dbFile := filepath .Join (tempDir , "my_db" )
521
521
522
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
522
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
523
523
require .NoError (b , err )
524
524
b .Cleanup (func () {
525
525
require .NoError (b , client .Close (context .TODO ()))
@@ -556,7 +556,7 @@ func BenchmarkClientInitLargeDB(b *testing.B) {
556
556
tempDir := b .TempDir ()
557
557
dbFile := filepath .Join (tempDir , "my_db" )
558
558
559
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
559
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
560
560
require .NoError (b , err )
561
561
b .Cleanup (func () {
562
562
require .NoError (b , client .Close (context .TODO ()))
@@ -575,7 +575,7 @@ func BenchmarkClientInitLargeDB(b *testing.B) {
575
575
var tempClient * fileStorageClient
576
576
b .ResetTimer ()
577
577
for n := 0 ; n < b .N ; n ++ {
578
- tempClient , err = newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
578
+ tempClient , err = newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
579
579
require .NoError (b , err )
580
580
b .StopTimer ()
581
581
err = tempClient .Close (ctx )
@@ -593,7 +593,7 @@ func BenchmarkClientCompactLargeDBFile(b *testing.B) {
593
593
tempDir := b .TempDir ()
594
594
dbFile := filepath .Join (tempDir , "my_db" )
595
595
596
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
596
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
597
597
require .NoError (b , err )
598
598
b .Cleanup (func () {
599
599
require .NoError (b , client .Close (context .TODO ()))
@@ -620,7 +620,7 @@ func BenchmarkClientCompactLargeDBFile(b *testing.B) {
620
620
testDbFile := filepath .Join (tempDir , fmt .Sprintf ("my_db%d" , n ))
621
621
err = os .Link (dbFile , testDbFile )
622
622
require .NoError (b , err )
623
- client , err = newClient (zap .NewNop (), testDbFile , time .Second , & CompactionConfig {})
623
+ client , err = newClient (zap .NewNop (), testDbFile , time .Second , & CompactionConfig {}, false )
624
624
require .NoError (b , err )
625
625
b .StartTimer ()
626
626
require .NoError (b , client .Compact (tempDir , time .Second , 65536 ))
@@ -637,7 +637,7 @@ func BenchmarkClientCompactDb(b *testing.B) {
637
637
tempDir := b .TempDir ()
638
638
dbFile := filepath .Join (tempDir , "my_db" )
639
639
640
- client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {})
640
+ client , err := newClient (zap .NewNop (), dbFile , time .Second , & CompactionConfig {}, false )
641
641
require .NoError (b , err )
642
642
b .Cleanup (func () {
643
643
require .NoError (b , client .Close (context .TODO ()))
@@ -664,7 +664,7 @@ func BenchmarkClientCompactDb(b *testing.B) {
664
664
testDbFile := filepath .Join (tempDir , fmt .Sprintf ("my_db%d" , n ))
665
665
err = os .Link (dbFile , testDbFile )
666
666
require .NoError (b , err )
667
- client , err = newClient (zap .NewNop (), testDbFile , time .Second , & CompactionConfig {})
667
+ client , err = newClient (zap .NewNop (), testDbFile , time .Second , & CompactionConfig {}, false )
668
668
require .NoError (b , err )
669
669
b .StartTimer ()
670
670
require .NoError (b , client .Compact (tempDir , time .Second , 65536 ))
0 commit comments