Skip to content

Commit e92f5d9

Browse files
committed
pkg/kversion: detect v3.5
1 parent 971e72d commit e92f5d9

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

‎pkg/kversion/kversion.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ func (vs *Versions) VersionGuess(opts ...VersionGuessOpt) string {
224224
{max320, "v3.2"},
225225
{max330, "v3.3"},
226226
{max340, "v3.4"},
227+
{max350, "v3.5"},
227228
} {
228229
for k, v := range comparison.cmp.filter(cfg.listener) {
229230
if v == -1 {
@@ -363,6 +364,7 @@ func V3_1_0() *Versions { return zkBrokerOf(max310) }
363364
func V3_2_0() *Versions { return zkBrokerOf(max320) }
364365
func V3_3_0() *Versions { return zkBrokerOf(max330) }
365366
func V3_4_0() *Versions { return zkBrokerOf(max340) }
367+
func V3_5_0() *Versions { return zkBrokerOf(max350) }
366368

367369
func zkBrokerOf(lks listenerKeys) *Versions {
368370
return &Versions{lks.filter(zkBroker)}
@@ -960,15 +962,19 @@ var max340 = nextMax(max330, func(v listenerKeys) listenerKeys {
960962
return v
961963
})
962964

965+
var max350 = nextMax(max340, func(v listenerKeys) listenerKeys {
966+
// KAFKA-13369 7146ac57ba9ddd035dac992b9f188a8e7677c08d KIP-405
967+
v[1].inc() // 14 fetch
968+
v[2].inc() // 8 list offsets
969+
970+
v[1].inc() // 15 fetch // KAFKA-14617 79b5f7f1ce2 KIP-903
971+
v[56].inc() // 3 alter partition // KAFKA-14617 8c88cdb7186b1d594f991eb324356dcfcabdf18a KIP-903
972+
return v
973+
})
974+
963975
var (
964-
maxStable = max340
976+
maxStable = max350
965977
maxTip = nextMax(maxStable, func(v listenerKeys) listenerKeys {
966-
// KAFKA-13369 7146ac57ba9ddd035dac992b9f188a8e7677c08d KIP-405
967-
v[1].inc() // 14 fetch // KAFKA-13369 7146ac57ba9 KIP-405
968-
v[2].inc() // 8 list offsets // same
969-
970-
v[1].inc() // 15 fetch // KAFKA-14617 79b5f7f1ce2 KIP-903
971-
v[56].inc() // 3 alter partition // KAFKA-14617 8c88cdb7186b1d594f991eb324356dcfcabdf18a KIP-903
972978
return v
973979
})
974980
)

0 commit comments

Comments
 (0)