Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update skipKeys for internal API keys #683

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/kversion/kversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ func (opt guessOpt) apply(cfg *guessCfg) { opt.fn(cfg) }
// 6: UpdateMetadata
// 7: ControlledShutdown
// 27: WriteTxnMarkers
// 57: UpdateFeatures
// 64: UnregisterBroker
// 67: AllocateProducerIds
func SkipKeys(keys ...int16) VersionGuessOpt {
return guessOpt{func(cfg *guessCfg) { cfg.skipKeys = keys }}
}
Expand Down Expand Up @@ -337,7 +340,7 @@ func (vs *Versions) versionGuess(opts ...VersionGuessOpt) guess {
//
// TODO: add introduced-version to differentiate some specific
// keys.
skipKeys: []int16{4, 5, 6, 7, 27, 58},
skipKeys: []int16{4, 5, 6, 7, 27, 57, 64, 67},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add UpdateFeatures? It's meant to be supported with/without Kraft. FWIW it's basically so far unused so I'm ok to remove it.

Envelope should still be filtered here, it's Kraft specific for the non-raft broker to forward a request to the raft broker when needed.

+1 for 64 and 67, also both Raft APIs, although this should also probably filter 59, 62, and 63

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UpdateFeatures is only used by brokers to update the list of finalized features or do I missunderstand this API? I think it's not used by clients and therefore I'd consider it part of the "internal" list, but maybe you had different criterias in mind what APIs should go into this list?

I actually thought 58 was a typo for 58, but I wasn't sure what the "Envelope" API does either.

Not sure what API 59, 62 and 63 are, I can't find it in the Apache Kafka protocol docs and they were not reported by Apache Kafka 3.7.0 either.

}
for _, opt := range opts {
opt.apply(&cfg)
Expand Down
Loading