Skip to content

Commit 6fa2ffd

Browse files
committed
storage: remove AdjustCompactionConcurrency
This is not used. Epic: none Release note: None
1 parent fa5a923 commit 6fa2ffd

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

pkg/storage/engine.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,10 +1106,6 @@ type Engine interface {
11061106
// concurrency. It returns the previous compaction concurrency.
11071107
SetCompactionConcurrency(n uint64) uint64
11081108

1109-
// AdjustCompactionConcurrency adjusts the compaction concurrency up or down by
1110-
// the passed delta, down to a minimum of 1.
1111-
AdjustCompactionConcurrency(delta int64) uint64
1112-
11131109
// SetStoreID informs the engine of the store ID, once it is known.
11141110
// Used to show the store ID in logs and to initialize the shared object
11151111
// creator ID (if shared object storage is configured).

pkg/storage/pebble.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -595,21 +595,6 @@ func (p *Pebble) RegisterLowDiskSpaceCallback(f func(info pebble.LowDiskSpaceInf
595595
p.lowDiskSpaceFunc.Store(&f)
596596
}
597597

598-
// AdjustCompactionConcurrency adjusts the compaction concurrency up or down by
599-
// the passed delta, down to a minimum of 1.
600-
func (p *Pebble) AdjustCompactionConcurrency(delta int64) uint64 {
601-
for {
602-
current := atomic.LoadUint64(&p.atomic.compactionConcurrency)
603-
adjusted := int64(current) + delta
604-
if adjusted < 1 {
605-
adjusted = 1
606-
}
607-
if atomic.CompareAndSwapUint64(&p.atomic.compactionConcurrency, current, uint64(adjusted)) {
608-
return uint64(adjusted)
609-
}
610-
}
611-
}
612-
613598
// SetStoreID adds the store id to pebble logs.
614599
func (p *Pebble) SetStoreID(ctx context.Context, storeID int32) error {
615600
if p == nil {

0 commit comments

Comments
 (0)