nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: cockroachdb/pebble
Pull request #3774 (2024-07-18 17:14:23)

compact: remove unused parameter in pickAutoLPositive
Removes the unused `levelMaxBytes` parameter from `pickAutoLPositive`.

cockroach-teamcity: 

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/cockroachdb/pebble/3774)
<!-- Reviewable:end -->

anish-shanbhag: TFTR!

Patch:
diff --git a/compaction_picker.go b/compaction_picker.go
index 4724a4b4..68cb9c55 100644
--- a/compaction_picker.go
+++ b/compaction_picker.go
@@ -1304,7 +1304,7 @@ func (p *compactionPickerByScore) pickAuto(env compactionEnv) (pc *pickedCompact
 			continue
 		}
 
-		pc := pickAutoLPositive(env, p.opts, p.vers, *info, p.baseLevel, p.levelMaxBytes)
+		pc := pickAutoLPositive(env, p.opts, p.vers, *info, p.baseLevel)
 		// Fail-safe to protect against compacting the same sstable concurrently.
 		if pc != nil && !inputRangeAlreadyCompacting(env, pc) {
 			p.addScoresToPickedCompactionMetrics(pc, scores)
@@ -1584,12 +1584,7 @@ func (p *compactionPickerByScore) pickRewriteCompaction(env compactionEnv) (pc *
 // file in a positive-numbered level. This function must not be used for
 // L0.
 func pickAutoLPositive(
-	env compactionEnv,
-	opts *Options,
-	vers *version,
-	cInfo candidateLevelInfo,
-	baseLevel int,
-	levelMaxBytes [numLevels]int64,
+	env compactionEnv, opts *Options, vers *version, cInfo candidateLevelInfo, baseLevel int,
 ) (pc *pickedCompaction) {
 	if cInfo.level == 0 {
 		panic("pebble: pickAutoLPositive called for L0")


Test patch:
diff --git a/compaction_test.go b/compaction_test.go
index 2a88a8dd..980f2279 100644
--- a/compaction_test.go
+++ b/compaction_test.go
@@ -48,12 +48,11 @@ func newVersion(opts *Options, files [numLevels][]*fileMetadata) *version {
 }
 
 type compactionPickerForTesting struct {
-	score         float64
-	level         int
-	baseLevel     int
-	opts          *Options
-	vers          *manifest.Version
-	maxLevelBytes [7]int64
+	score     float64
+	level     int
+	baseLevel int
+	opts      *Options
+	vers      *manifest.Version
 }
 
 var _ compactionPicker = &compactionPickerForTesting{}
@@ -90,7 +89,7 @@ func (p *compactionPickerForTesting) pickAuto(env compactionEnv) (pc *pickedComp
 	if cInfo.level == 0 {
 		return pickL0(env, p.opts, p.vers, p.baseLevel)
 	}
-	return pickAutoLPositive(env, p.opts, p.vers, cInfo, p.baseLevel, p.maxLevelBytes)
+	return pickAutoLPositive(env, p.opts, p.vers, cInfo, p.baseLevel)
 }
 
 func (p *compactionPickerForTesting) pickElisionOnlyCompaction(