apoorvmittal10 opened a new pull request, #18710: URL: https://github.com/apache/kafka/pull/18710
The PR fixes the below flaky tests: - testDelayedInitializationShouldCompleteFetchRequest - testReplicaManagerFetchShouldProceed The tests are flaky where additional failed fetch metric is sometimes recorded because on an underlying flaky failure in `RemoteLogManager`. This needs more investigation hence I have added task: https://issues.apache.org/jira/browse/KAFKA-18650 where it could be an issue with `RemoteLogManager` or the mocking in tests. To fix the flakiness in tests I have checked specific `share fetch request` metric only. ``` [2025-01-16 18:43:20,963] WARN [RemoteLogManager=0 partition=qb2Ob0GUTU-Tom06ZITq7w:Leader-0] Current task for partition qb2Ob0GUTU-Tom06ZITq7w:Leader-0 received error but it will be scheduled (kafka.log.remote.RemoteLogManager$RLMTask:832) java.lang.NullPointerException: null [2025-01-16 18:43:20,963] WARN [RemoteLogManager=0 partition=qb2Ob0GUTU-Tom06ZITq7w:Leader-0] Current task for partition qb2Ob0GUTU-Tom06ZITq7w:Leader-0 received error but it will be scheduled (kafka.log.remote.RemoteLogManager$RLMTask:832) java.lang.NullPointerException: Cannot invoke "java.util.Iterator.hasNext()" because "segmentMetadataIter" is null at kafka.log.remote.RemoteLogManager$RLMExpirationTask.cleanupExpiredRemoteLogSegments(RemoteLogManager.java:1251) ~[main/:?] at kafka.log.remote.RemoteLogManager$RLMExpirationTask.execute(RemoteLogManager.java:1119) ~[main/:?] at kafka.log.remote.RemoteLogManager$RLMTask.run(RemoteLogManager.java:823) ~[main/:?] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?] at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?] at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1575) [?:?] [2025-01-16 18:43:21,064] WARN [RemoteLogManager=0 partition=qb2Ob0GUTU-Tom06ZITq7w:Leader-0] Current task for partition qb2Ob0GUTU-Tom06ZITq7w:Leader-0 received error but it will be scheduled (kafka.log.remote.RemoteLogManager$RLMTask:832) java.lang.NullPointerException: Cannot invoke "java.util.Iterator.hasNext()" because "segmentMetadataIter" is null at kafka.log.remote.RemoteLogManager$RLMExpirationTask.cleanupExpiredRemoteLogSegments(RemoteLogManager.java:1251) ~[main/:?] at kafka.log.remote.RemoteLogManager$RLMExpirationTask.execute(RemoteLogManager.java:1119) ~[main/:?] at kafka.log.remote.RemoteLogManager$RLMTask.run(RemoteLogManager.java:823) ~[main/:?] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?] at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?] at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1575) [?:?] [2025-01-16 18:43:21,075] WARN [RemoteLogManager=0 partition=qb2Ob0GUTU-Tom06ZITq7w:Leader-0] Current task for partition qb2Ob0GUTU-Tom06ZITq7w:Leader-0 received error but it will be scheduled (kafka.log.remote.RemoteLogManager$RLMTask:832) java.lang.NullPointerException: null [2025-01-16 18:43:21,168] WARN [RemoteLogManager=0 partition=qb2Ob0GUTU-Tom06ZITq7w:Leader-0] Current task for partition qb2Ob0GUTU-Tom06ZITq7w:Leader-0 received error but it will be scheduled (kafka.log.remote.RemoteLogManager$RLMTask:832) java.lang.NullPointerException: Cannot invoke "java.util.Iterator.hasNext()" because "segmentMetadataIter" is null at kafka.log.remote.RemoteLogManager$RLMExpirationTask.cleanupExpiredRemoteLogSegments(RemoteLogManager.java:1251) ~[main/:?] at kafka.log.remote.RemoteLogManager$RLMExpirationTask.execute(RemoteLogManager.java:1119) ~[main/:?] at kafka.log.remote.RemoteLogManager$RLMTask.run(RemoteLogManager.java:823) ~[main/:?] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?] at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?] at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1575) [?:?] [2025-01-16 18:43:21,176] WARN [RemoteLogManager=0 partition=qb2Ob0GUTU-Tom06ZITq7w:Leader-0] Current task for partition qb2Ob0GUTU-Tom06ZITq7w:Leader-0 received error but it will be scheduled (kafka.log.remote.RemoteLogManager$RLMTask:832) java.lang.NullPointerException: null -- 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]
