MINOR; Validate at least one control record#15912
Merged
jsancio merged 5 commits intoapache:trunkfrom May 14, 2024
Merged
Conversation
junrao
reviewed
May 9, 2024
| * If this function returns true is means that one of the voter set commits an offset, it means | ||
| * that the other voter set cannot commit a conflicting offset. | ||
| * If this function returns true, it means that if one of the set of voters commits an offset, the | ||
| * the other set of voters cannot commit a conflicting offset. |
chia7712
reviewed
May 10, 2024
| ); | ||
| } else if (numberOfRecords == null) { | ||
| throw new IllegalArgumentException("valueCreator didn't create a batch with the count"); | ||
| } else if (numberOfRecords < 1) { |
Member
There was a problem hiding this comment.
Is it possible to add new UT to BatchAccumulatorTest for this case?
Member
Author
junrao
reviewed
May 10, 2024
|
|
||
| private int validateMemoryRecordAndReturnCount(MemoryRecords memoryRecord) { | ||
| // Confirm that it is at most one batch and it is a control record | ||
| // Confirm that it is one control batch and it is at least one control record |
Contributor
There was a problem hiding this comment.
validateMemoryRecordAndReturnCount => validateMemoryRecordsAndReturnCount
memoryRecord => memoryRecords
Also, there is an existing typo creatte on line 268.
Member
Author
|
Merging. The errors are unrelated to this change. |
TaiJuWu
pushed a commit
to TaiJuWu/kafka
that referenced
this pull request
Jun 8, 2024
Validate that a control batch in the batch accumulator has at least one control record. Reviewers: Jun Rao <junrao@apache.org>, Chia-Ping Tsai <chia7712@apache.org>
gongxuanzhang
pushed a commit
to gongxuanzhang/kafka
that referenced
this pull request
Jun 12, 2024
Validate that a control batch in the batch accumulator has at least one control record. Reviewers: Jun Rao <junrao@apache.org>, Chia-Ping Tsai <chia7712@apache.org>
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.
Validate that a control batch in the batch accumulator has at least one control record.
Committer Checklist (excluded from commit message)