Skip to content

Commit aac357d

Browse files
committed
lint fixes
1 parent ced8274 commit aac357d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pkg/store/badger_options.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ func BadgerOptions() *badger4.Options {
1313

1414
// Disable conflict detection to reduce write overhead; ev-node does not rely
1515
// on Badger's multi-writer conflict checks for correctness.
16-
opts.Options = opts.Options.WithDetectConflicts(false)
16+
opts.Options = opts.WithDetectConflicts(false)
1717
// Allow more L0 tables before compaction kicks in to smooth bursty ingest.
18-
opts.Options = opts.Options.WithNumLevelZeroTables(10)
18+
opts.Options = opts.WithNumLevelZeroTables(10)
1919
// Stall threshold is raised to avoid write throttling under heavy load.
20-
opts.Options = opts.Options.WithNumLevelZeroTablesStall(20)
20+
opts.Options = opts.WithNumLevelZeroTablesStall(20)
2121
// Scale compaction workers to available CPUs without over-saturating.
22-
opts.Options = opts.Options.WithNumCompactors(compactorCount())
22+
opts.Options = opts.WithNumCompactors(compactorCount())
2323

2424
return &opts
2525
}

pkg/store/kv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ func rootify(rootDir, dbPath string) string {
5757
// NewTestInMemoryKVStore builds KVStore that works in-memory (without accessing disk).
5858
func NewTestInMemoryKVStore() (ds.Batching, error) {
5959
inMemoryOptions := BadgerOptions()
60-
inMemoryOptions.Options = inMemoryOptions.Options.WithInMemory(true)
60+
inMemoryOptions.Options = inMemoryOptions.WithInMemory(true)
6161
return badger4.NewDatastore("", inMemoryOptions)
6262
}

tools/db-bench/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func runProfile(p profile, dir string, cfg config) (result, error) {
115115
}
116116
actualBytes := int64(totalWrites) * int64(cfg.valueSize)
117117

118-
rng := rand.New(rand.NewSource(1)) // Deterministic data for comparable runs.
118+
rng := rand.New(rand.NewSource(1)) // nolint:gosec
119119
value := make([]byte, cfg.valueSize)
120120
if _, err := rng.Read(value); err != nil {
121121
return result{}, fmt.Errorf("failed to seed value bytes: %w", err)

0 commit comments

Comments
 (0)