KAFKA-13710: bring the InvalidTimestampException back for record error#11853
Merged
showuon merged 2 commits intoapache:trunkfrom Mar 8, 2022
Merged
KAFKA-13710: bring the InvalidTimestampException back for record error#11853showuon merged 2 commits intoapache:trunkfrom
showuon merged 2 commits intoapache:trunkfrom
Conversation
showuon
commented
Mar 6, 2022
Comment on lines
1399
to
+1401
| // if there is a mix of both regular InvalidRecordException and InvalidTimestampException, | ||
| // InvalidTimestampException is no longer takes precedence. The type of invalidException | ||
| // is unified as InvalidRecordException | ||
| assertTrue(e.invalidException.isInstanceOf[InvalidRecordException]) | ||
| // InvalidTimestampException takes precedence | ||
| assertTrue(e.invalidException.isInstanceOf[InvalidTimestampException]) |
Member
Author
There was a problem hiding this comment.
Since v2.4, (PR: #7612), we intentionally let InvalidTimestampException take precedence. I think we should keep the same behavior as before.
Corlobin
approved these changes
Mar 6, 2022
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.
In #11830, we remove the
InvalidTimestampExceptioncase and failed 2 test cases. It looks like we intended to treat theINVALID_TIMESTAMPerror as special case. So, added back theINVALID_TIMESTAMPcase to fix the tests.Failed test:
kafka.server.ProduceRequestTest.testProduceWithInvalidTimestamp()
kafka.api.PlaintextProducerSendTest.testSendWithInvalidCreateTime()
Committer Checklist (excluded from commit message)