Skip to content

Commit

Permalink
pkg/kversion: detect v3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Jul 7, 2023
1 parent 971e72d commit e92f5d9
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions pkg/kversion/kversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ func (vs *Versions) VersionGuess(opts ...VersionGuessOpt) string {
{max320, "v3.2"},
{max330, "v3.3"},
{max340, "v3.4"},
{max350, "v3.5"},
} {
for k, v := range comparison.cmp.filter(cfg.listener) {
if v == -1 {
Expand Down Expand Up @@ -363,6 +364,7 @@ func V3_1_0() *Versions { return zkBrokerOf(max310) }
func V3_2_0() *Versions { return zkBrokerOf(max320) }
func V3_3_0() *Versions { return zkBrokerOf(max330) }
func V3_4_0() *Versions { return zkBrokerOf(max340) }
func V3_5_0() *Versions { return zkBrokerOf(max350) }

func zkBrokerOf(lks listenerKeys) *Versions {
return &Versions{lks.filter(zkBroker)}
Expand Down Expand Up @@ -960,15 +962,19 @@ var max340 = nextMax(max330, func(v listenerKeys) listenerKeys {
return v
})

var max350 = nextMax(max340, func(v listenerKeys) listenerKeys {
// KAFKA-13369 7146ac57ba9ddd035dac992b9f188a8e7677c08d KIP-405
v[1].inc() // 14 fetch
v[2].inc() // 8 list offsets

v[1].inc() // 15 fetch // KAFKA-14617 79b5f7f1ce2 KIP-903
v[56].inc() // 3 alter partition // KAFKA-14617 8c88cdb7186b1d594f991eb324356dcfcabdf18a KIP-903
return v
})

var (
maxStable = max340
maxStable = max350
maxTip = nextMax(maxStable, func(v listenerKeys) listenerKeys {
// KAFKA-13369 7146ac57ba9ddd035dac992b9f188a8e7677c08d KIP-405
v[1].inc() // 14 fetch // KAFKA-13369 7146ac57ba9 KIP-405
v[2].inc() // 8 list offsets // same

v[1].inc() // 15 fetch // KAFKA-14617 79b5f7f1ce2 KIP-903
v[56].inc() // 3 alter partition // KAFKA-14617 8c88cdb7186b1d594f991eb324356dcfcabdf18a KIP-903
return v
})
)

0 comments on commit e92f5d9

Please sign in to comment.