Skip to content

Commit

Permalink
breaking kmsg: update per protocol changes
Browse files Browse the repository at this point in the history
This will break existing usages of kmsg.MetadataResponseTopic.Topic,
which is likely not used *too* much. However, this is further impetus to
just have major versions for kmsg that change anytime the protocol
breaks.
  • Loading branch information
twmb committed Aug 29, 2021
1 parent 262afb4 commit fcaaf3f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions generate/definitions/03_metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// MetadataRequest requests metadata from Kafka.
MetadataRequest => key 3, max version 11, flexible v9+
MetadataRequest => key 3, max version 12, flexible v9+
// Topics is a list of topics to return metadata about. If this is null
// in v1+, all topics are included. If this is empty, no topics are.
// For v0 (<Kafka 0.10.0.0), if this is empty, all topics are included.
Expand Down Expand Up @@ -63,7 +63,7 @@ MetadataResponse =>
// There can be a myriad of other errors for unsuccessful topic creation.
ErrorCode: int16
// Topic is the topic this metadata corresponds to.
Topic: string
Topic: nullable-string
// The topic ID.
TopicID: uuid // v10+
// IsInternal signifies whether this topic is a Kafka internal topic.
Expand Down
16 changes: 8 additions & 8 deletions pkg/kmsg/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/kversion/kversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,8 @@ var maxTip = nextMax(max280, func(v listenerKeys) listenerKeys {
// KAFKA-10580 2b8aff58b575c199ee8372e5689420c9d77357a5 KIP-516
v[1].inc() // 13 fetch

// KAFKA-10744 1d22b0d70686aef5689b775ea2ea7610a37f3e8c KIP-516
v[3].inc() // 12 metadata

return v
})

// NOTE when adding to this, be sure to update any raw usages of requests in
// kgo (because we do not go through NewXyzRequest() to set fields).

0 comments on commit fcaaf3f

Please sign in to comment.