Skip to content

Commit

Permalink
Fix passing compaction-batch-limit to etcd v3.4 and v3.5
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Siarkowicz <[email protected]>
  • Loading branch information
serathius committed Jan 17, 2025
1 parent 9da01a8 commit 3824aed
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/framework/e2e/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"go.uber.org/zap/zaptest"

"go.etcd.io/etcd/api/v3/etcdserverpb"
"go.etcd.io/etcd/api/v3/version"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/featuregate"
"go.etcd.io/etcd/pkg/v3/proxy"
Expand Down Expand Up @@ -630,6 +631,10 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in
default:
panic(fmt.Sprintf("Unknown cluster version %v", cfg.Version))
}
v, err := GetVersionFromBinary(execPath)
if err != nil {
panic(err)
}

defaultValues := values(*embed.NewConfig())
overrideValues := values(cfg.ServerConfig)
Expand All @@ -640,6 +645,12 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in
if flag == "experimental-snapshot-catchup-entries" && !CouldSetSnapshotCatchupEntries(execPath) {
continue
}
if flag == "experimental-compaction-batch-limit" {
continue
}
if flag == "compaction-batch-limit" && v.LessThan(version.V3_6) {
flag = "experimental-compaction-batch-limit"
}
args = append(args, fmt.Sprintf("--%s=%s", flag, value))
}
envVars := map[string]string{}
Expand Down

0 comments on commit 3824aed

Please sign in to comment.