Repository navigation
Conversation
The two mock bootstraps check refresh-loop identity rather than handshake speed. Use the existing fixture request_timeout_ms for both calls, retaining the real bootstrap operations and identity assertions. Production timeouts and the memoryview regressions are unchanged.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Typed and multidimensional
memoryviewpayloads are accepted byKafkaProducer.send, but theirlen()counts elements or leading dimensions. The partitioner and record encoders then interpret that count as bytes, producing incorrect partition hashes, size estimates and record lengths. For example, a two-elementHview contains four bytes; its current legacy batches fail CRC validation, while its v2 record fails decoding.Normalize serialized views before metadata-result sizing, partitioning and accumulation. C-contiguous views become unsigned byte views over the same backing object; strided views use their logical bytes. Existing bytes, bytearrays, nulls and header validation are unchanged.
Validation on Python 3.13.1/macOS:
bytes(view)after the existing MockBroker/accumulator fixture, with partition, size-limit and no-copy controls. This uses no real Kafka broker.make lintandgit diff --checkpass.