Hello Everyone ,

Recently we faced an issue where produce request to one topic was failing on 
one of the brokers. On further investigation, we found 
"java.lang.ClassCastException: org.apache.kafka.common.TopicPartition" in the 
stacktrace. The issue was mitigated by restart the problematic broker.


We are using kafka version 2.8.2, and want to know if there is any existing 
reported bug with this version.


Stacktrace:

[2025-04-01T12:55:19,904Z]  [INFO ]  [kafka-scheduler-4]  
[kafka.log.LogSegment]  Deleted time index 
/data/kafka/upsert-69/00000000003318491578.timeindex.deleted.
java.lang.ClassCastException: org.apache.kafka.common.TopicPartition cannot be 
cast to java.lang.Long
      at java.lang.Long.compareTo(Long.java:54)
      at 
java.util.concurrent.ConcurrentSkipListMap.cpr(ConcurrentSkipListMap.java:655)
      at 
java.util.concurrent.ConcurrentSkipListMap.findPredecessor(ConcurrentSkipListMap.java:682)
      at 
java.util.concurrent.ConcurrentSkipListMap.doRemove(ConcurrentSkipListMap.java:960)
      at 
java.util.concurrent.ConcurrentSkipListMap.remove(ConcurrentSkipListMap.java:1595)
      at 
kafka.log.ProducerStateManager.removeAndDeleteSnapshot(ProducerStateManager.scala:829)
      at kafka.log.Log.$anonfun$deleteSegmentFiles$5(Log.scala:2376)
      at kafka.log.Log.$anonfun$deleteSegmentFiles$5$adapted(Log.scala:2373)
      at scala.collection.immutable.List.foreach(List.scala:392)
      at kafka.log.Log.$anonfun$deleteSegmentFiles$4(Log.scala:2373)
      at kafka.log.Log.deleteSegments$1(Log.scala:2482)
      at kafka.log.Log.$anonfun$deleteSegmentFiles$6(Log.scala:2382)
      at 
kafka.utils.KafkaScheduler.$anonfun$schedule$2(KafkaScheduler.scala:114)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:750)
[2025-04-01T12:55:19,904Z]  [ERROR]  [kafka-scheduler-5]  
[kafka.utils.KafkaScheduler]  Uncaught exception in scheduled task 'delete-file'
[2025-04-01T12:55:19,903Z]  [INFO ]  [kafka-scheduler-4]  
[kafka.log.LogSegment]  Deleted offset index 
/data/kafka/upsert-69/00000000003318491578.index.deleted.
[2025-04-01T12:55:19,903Z]  [INFO ]  [kafka-scheduler-5]  
[kafka.log.LogSegment]  Deleted time index 
/data/kafka/merged-78/00000000000695877126.timeindex.deleted.







Regards,​
Atul

Reply via email to