-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kgo / kmsg: process the RecordBatches field in FetchResponses properly
As it turns out, a FetchResponse can be of high enough version to use actual record batches, but still use message sets. Rather than relying on the response version, we need to check the magic in each batch. It may be possible that each batch has a different magic from one batch to the next, so we cannot just check the first batch and use that for all decoding. For message set v1, it is also possible that a client could have used messages v0, compressed them, and used that as the "inner messages" in a message v1. All of these cases are now handled properly, which necessitated the removal of some functions from kmsg. The functions in kmsg were not necessarily correct. Further, it was a bit odd to stuff message decoding and validating into kmsg. This makes kmsg a more dedicated encoding / decoding package.
- Loading branch information
Showing
4 changed files
with
226 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.