Skip to content

Commit

Permalink
pkg/kversion: detect 3.6
Browse files Browse the repository at this point in the history
This does not yet add V3_6_0 since that will require a minor.
  • Loading branch information
twmb committed Oct 22, 2023
1 parent fe5a660 commit 2a3b6bd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pkg/kversion/kversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ func (vs *Versions) versionGuess(opts ...VersionGuessOpt) guess {
{max330, "v3.3"},
{max340, "v3.4"},
{max350, "v3.5"},
{max360, "v3.6"},
} {
for k, v := range comparison.cmp.filter(cfg.listener) {
if v == -1 {
Expand Down Expand Up @@ -445,6 +446,10 @@ func V3_3_0() *Versions { return zkBrokerOf(max330) }
func V3_4_0() *Versions { return zkBrokerOf(max340) }
func V3_5_0() *Versions { return zkBrokerOf(max350) }

/* TODO wait for franz-go v1.16
func V3_6_0() *Versions { return zkBrokerOf(max360) }
*/

func zkBrokerOf(lks listenerKeys) *Versions {
return &Versions{lks.filter(zkBroker)}
}
Expand Down Expand Up @@ -1051,8 +1056,15 @@ var max350 = nextMax(max340, func(v listenerKeys) listenerKeys {
return v
})

var max360 = nextMax(max350, func(v listenerKeys) listenerKeys {
// KAFKA-14402 29a1a16668d76a1cc04ec9e39ea13026f2dce1de KIP-890
// Later commit swapped to stable
v[24].inc() // 4 add partitions to txn
return v
})

var (
maxStable = max350
maxStable = max360
maxTip = nextMax(maxStable, func(v listenerKeys) listenerKeys {
return v
})
Expand Down

0 comments on commit 2a3b6bd

Please sign in to comment.