junrao commented on PR #19961: URL: https://github.com/apache/kafka/pull/19961#issuecomment-3020220752
@Forest0923 : Thanks for the updated PR. The following test failure seems related to this PR. My understanding is that this is caused by low retention size that closes the handler of the index file during async delete. However, by default, the delete is delayed by 60 secs. So, I don't quite understand why this failure is showing up in this test. Do you know what's causing this test to fail now? ``` 2025-06-27T23:53:14.7339866Z Gradle Test Run :core:test > Gradle Test Executor 27 > PartitionTest > testPartitionListenerWhenPartitionIsDeleted() STARTED 2025-06-27T23:53:14.8388700Z kafka.log.LogConcurrencyTest.testUncommittedDataNotConsumedFrequentSegmentRolls() failed, log available in /home/runner/work/kafka/kafka/core/build/reports/testOutput/kafka.log.LogConcurrencyTest.testUncommittedDataNotConsumedFrequentSegmentRolls().test.stdout 2025-06-27T23:53:14.8470450Z 2025-06-27T23:53:14.8471838Z Gradle Test Run :core:test > Gradle Test Executor 29 > LogConcurrencyTest > testUncommittedDataNotConsumedFrequentSegmentRolls() FAILED 2025-06-27T23:53:14.8480019Z java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "java.nio.MappedByteBuffer.duplicate()" because the return value of "org.apache.kafka.storage.internals.log.OffsetIndex.mmap()" is null 2025-06-27T23:53:14.8482629Z at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) 2025-06-27T23:53:14.8484193Z at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) 2025-06-27T23:53:14.8485686Z at kafka.log.LogConcurrencyTest.testUncommittedDataNotConsumed(LogConcurrencyTest.scala:78) 2025-06-27T23:53:14.8487462Z at kafka.log.LogConcurrencyTest.testUncommittedDataNotConsumedFrequentSegmentRolls(LogConcurrencyTest.scala:64) 2025-06-27T23:53:14.8490356Z 2025-06-27T23:53:14.8490782Z Caused by: 2025-06-27T23:53:14.8492826Z java.lang.NullPointerException: Cannot invoke "java.nio.MappedByteBuffer.duplicate()" because the return value of "org.apache.kafka.storage.internals.log.OffsetIndex.mmap()" is null 2025-06-27T23:53:14.8494790Z at org.apache.kafka.storage.internals.log.OffsetIndex.lambda$lookup$0(OffsetIndex.java:99) 2025-06-27T23:53:14.8496193Z at org.apache.kafka.storage.internals.log.AbstractIndex.inRemapReadLock(AbstractIndex.java:432) 2025-06-27T23:53:14.8497708Z at org.apache.kafka.storage.internals.log.OffsetIndex.lookup(OffsetIndex.java:98) 2025-06-27T23:53:14.8499080Z at org.apache.kafka.storage.internals.log.LogSegment.translateOffset(LogSegment.java:395) 2025-06-27T23:53:14.8500435Z at org.apache.kafka.storage.internals.log.LogSegment.translateOffset(LogSegment.java:377) 2025-06-27T23:53:14.8501747Z at org.apache.kafka.storage.internals.log.LogSegment.read(LogSegment.java:435) 2025-06-27T23:53:14.8503390Z at org.apache.kafka.storage.internals.log.LocalLog.lambda$read$12(LocalLog.java:505) 2025-06-27T23:53:14.8504745Z at org.apache.kafka.storage.internals.log.LocalLog.maybeHandleIOException(LocalLog.java:816) 2025-06-27T23:53:14.8506085Z at org.apache.kafka.storage.internals.log.LocalLog.maybeHandleIOException(LocalLog.java:190) 2025-06-27T23:53:14.8507296Z at org.apache.kafka.storage.internals.log.LocalLog.read(LocalLog.java:467) 2025-06-27T23:53:14.8508404Z at org.apache.kafka.storage.internals.log.UnifiedLog.read(UnifiedLog.java:1605) 2025-06-27T23:53:14.8509490Z at kafka.log.LogConcurrencyTest$ConsumerTask.call(LogConcurrencyTest.scala:94) 2025-06-27T23:53:14.8510815Z at kafka.log.LogConcurrencyTest$ConsumerTask.call(LogConcurrencyTest.scala:88) 2025-06-27T23:53:14.8511923Z at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) 2025-06-27T23:53:14.8557331Z at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) 2025-06-27T23:53:14.8558698Z at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) 2025-06-27T23:53:14.8559767Z at java.base/java.lang.Thread.run(Thread.java:1575) ``` -- 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]
