kevin-wu24 commented on PR #23941:
URL: https://github.com/apache/kafka/pull/23941#issuecomment-6369793755

   Notes for reviewers:
   
   The `FileRecords#readInto` change applies as on trunk. Differences from the 
trunk commit:
   
   - `RecordsIterator`: 3.9 has no `firstBatchSize` local or "Creating a new 
buffer" log line, so only the new condition is applied.
   - `RecordsIteratorTest`: kept this branch's jqwik `@Property` tests, as in 
the 4.2 and 4.3 backports. The new `createIterator(records, bufferSupplier, 
batchSize, validateCrc)` overload uses the 3.9 constructor, which takes a 
`RecordSerde` and no `LogContext`.
   - 3.9 compiles tests with `--release 8`, so `List.of`/`Set.of` became 
`Arrays.asList`, `Collections.singletonList` and `Collections.emptySet`.
   - `MemoryRecords#slice` doesn't exist on 3.9, so 
`testRecordsEndingInPartialBatch` builds the partial `MemoryRecords` from a 
duplicate of the buffer with a lower limit.
   - `FileRecordsTest`: added the `ParameterizedTest`/`ValueSource` imports, 
and `testReadIntoWithPositionOutsideRecords` declares `throws IOException` 
because `FileRecords#slice` throws it on 3.9.
   - Ran locally on JDK 17: `./gradlew :clients:test --tests 
'org.apache.kafka.common.record.*' :raft:test`, plus `checkstyleMain`, 
`checkstyleTest` and `spotlessCheck` for `clients` and `raft`. All passed.
   


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