coderbruis opened a new pull request, #22722: URL: https://github.com/apache/kafka/pull/22722
This patch updates the CreateTopics partition count validation. Changes: * Update the validation comment to state that a request may create at most `MAX_PARTITIONS_PER_BATCH` partitions. * Use a `long` counter to prevent integer overflow when accumulating partition counts from the request. * Move the limit check inside the loop so that oversized requests fail as soon as the limit is exceeded. Test: * Add `testTotalNumberOfPartitionsValidationDoesNotOverflow` to cover a CreateTopics request large enough to overflow an `int`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
