johnnychhsu opened a new pull request, #15638:
URL: https://github.com/apache/kafka/pull/15638

   ## Context
   In `MemoeyRecordsBuilder.appendLegacyRecord`, there are two similar checks 
currently
   
   1.  
   ```
   if (compressionType == CompressionType.NONE && timestampType == 
TimestampType.LOG_APPEND_TIME)
   ```
   
   2. 
   ```
   if (timestampType == TimestampType.LOG_APPEND_TIME)
   ```
   
   The first check verify the timestamp type and compression type, the second 
check verify the timestamp type again.
   However, if it's LOG_APPEND_TIME, we should choose the `logAppendTime` no 
matter whether it's compressed or not.
   The `logAppendTime` is init in LogValidator 203L. 
   
   ## Solution 
   Remove the redundant check.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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]

Reply via email to