Skip to content

Commit

Permalink
Merge pull request #19218 from serathius/fix-selecting-experimental-flag
Browse files Browse the repository at this point in the history
 Fix passing compaction-batch-limit to etcd v3.4 and v3.5
  • Loading branch information
serathius authored Jan 20, 2025
2 parents 83cf7bb + 8c989a1 commit 5ccbeec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/robustness/failpoint/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (t triggerCompact) Trigger(ctx context.Context, _ *testing.T, member e2e.Et
}
rev = resp.Header.Revision

if !t.multiBatchCompaction || rev > int64(clus.Cfg.ServerConfig.CompactionBatchLimit) {
if !t.multiBatchCompaction || rev > int64(clus.Cfg.ServerConfig.ExperimentalCompactionBatchLimit) {
break
}
time.Sleep(50 * time.Millisecond)
Expand All @@ -99,7 +99,7 @@ func (t triggerCompact) Available(config e2e.EtcdProcessClusterConfig, _ e2e.Etc
// For multiBatchCompaction we need to guarantee that there are enough revisions between two compaction requests.
// With addition of compaction requests to traffic this might be hard if experimental-compaction-batch-limit is too high.
if t.multiBatchCompaction {
return config.ServerConfig.CompactionBatchLimit <= 10
return config.ServerConfig.ExperimentalCompactionBatchLimit <= 10
}
return true
}
Expand Down
4 changes: 2 additions & 2 deletions tests/robustness/options/server_config_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ func WithSnapshotCount(input ...uint64) e2e.EPClusterOption {
}
}

func WithCompactionBatchLimit(input ...int) e2e.EPClusterOption {
func WithExperimentalCompactionBatchLimit(input ...int) e2e.EPClusterOption {
return func(c *e2e.EtcdProcessClusterConfig) {
c.ServerConfig.CompactionBatchLimit = input[internalRand.Intn(len(input))]
c.ServerConfig.ExperimentalCompactionBatchLimit = input[internalRand.Intn(len(input))]
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/robustness/scenarios/scenarios.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func Exploratory(_ *testing.T) []TestScenario {
options.WithSubsetOptions(randomizableOptions...),
e2e.WithGoFailEnabled(true),
// Set low minimal compaction batch limit to allow for triggering multi batch compaction failpoints.
options.WithCompactionBatchLimit(10, 100, 1000),
options.WithExperimentalCompactionBatchLimit(10, 100, 1000),
e2e.WithWatchProcessNotifyInterval(100 * time.Millisecond),
}

Expand Down Expand Up @@ -219,7 +219,7 @@ func Regression(t *testing.T) []TestScenario {
Traffic: traffic.Kubernetes,
Cluster: *e2e.NewConfig(
e2e.WithClusterSize(1),
e2e.WithCompactionBatchLimit(300),
e2e.WithExperimentalCompactionBatchLimit(300),
e2e.WithSnapshotCount(1000),
e2e.WithGoFailEnabled(true),
),
Expand Down

0 comments on commit 5ccbeec

Please sign in to comment.