-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TopicBasedRemoteLogMetadataManager not initialized on time when Kafka restarted #27
Comments
Probably a race condition, this is the log related to TopicBasedRemoteLogMetadataManager during that time:
It's hitting the following line, there was an exception during initialization, not printed out:
|
This error is probably not fatal, it seems RLM can recover. |
Yes, it works despite the error. But of course still needs fixing. |
Add a log statement and this is underlying exception when first initialize failed:
|
The topic is __remote_log_metadata, should already be created. AdminClient.describeTopic failed on first try |
The AdminClient is connecting to localhost:9092, Kafka server might not be ready yet to answer describe call |
Add this property helps shorten the waiting cycle:
|
Saw the following exception when Kafka broker is restarted, looks like TopicBasedRemoteLogMetadataManager is not initialized on time:
kafka-tiered-storage-demo-kafka-1 | [2023-06-08 18:55:07,283] INFO Created a new task: class kafka.log.remote.RemoteLogManager$RLMTask[HnwaKTgCRz2dp901XqiO9g:topic1-0] and getting scheduled (kafka.log.remote.RemoteLogManager)
kafka-tiered-storage-demo-kafka-1 | [2023-06-08 18:55:07,286] INFO Scheduling runnable class kafka.log.remote.RemoteLogManager$RLMTask[HnwaKTgCRz2dp901XqiO9g:topic1-0] with initial delay: 0, fixed delay: 5000 (kafka.log.remote.RLMScheduledThreadPool)
kafka-tiered-storage-demo-kafka-1 | [2023-06-08 18:55:07,291] INFO [RemoteLogManager=0 partition=HnwaKTgCRz2dp901XqiO9g:topic1-0] Find the highest remote offset for partition: HnwaKTgCRz2dp901XqiO9g:topic1-0 after becoming leader, leaderEpoch: 0 (kafka.log.remote.RemoteLogManager$RLMTask)
kafka-tiered-storage-demo-kafka-1 | [2023-06-08 18:55:07,310] ERROR [RemoteLogManager=0 partition=HnwaKTgCRz2dp901XqiO9g:topic1-0] Error occurred while copying log segments of partition: HnwaKTgCRz2dp901XqiO9g:topic1-0 (kafka.log.remote.RemoteLogManager$RLMTask)
kafka-tiered-storage-demo-kafka-1 | java.lang.IllegalStateException: This instance is in invalid state, initialized: false close: false
kafka-tiered-storage-demo-kafka-1 | at org.apache.kafka.server.log.remote.metadata.storage.TopicBasedRemoteLogMetadataManager.ensureInitializedAndNotClosed(TopicBasedRemoteLogMetadataManager.java:501)
kafka-tiered-storage-demo-kafka-1 | at org.apache.kafka.server.log.remote.metadata.storage.TopicBasedRemoteLogMetadataManager.highestOffsetForEpoch(TopicBasedRemoteLogMetadataManager.java:224)
kafka-tiered-storage-demo-kafka-1 | at kafka.log.remote.RemoteLogManager.$anonfun$findHighestRemoteOffset$2(RemoteLogManager.scala:612)
kafka-tiered-storage-demo-kafka-1 | at kafka.log.remote.RemoteLogManager.$anonfun$findHighestRemoteOffset$2$adapted(RemoteLogManager.scala:609)
kafka-tiered-storage-demo-kafka-1 | at scala.Option.foreach(Option.scala:437)
kafka-tiered-storage-demo-kafka-1 | at kafka.log.remote.RemoteLogManager.$anonfun$findHighestRemoteOffset$1(RemoteLogManager.scala:609)
kafka-tiered-storage-demo-kafka-1 | at kafka.log.remote.RemoteLogManager.$anonfun$findHighestRemoteOffset$1$adapted(RemoteLogManager.scala:608)
kafka-tiered-storage-demo-kafka-1 | at scala.Option.foreach(Option.scala:437)
kafka-tiered-storage-demo-kafka-1 | at kafka.log.remote.RemoteLogManager.findHighestRemoteOffset(RemoteLogManager.scala:608)
kafka-tiered-storage-demo-kafka-1 | at kafka.log.remote.RemoteLogManager$RLMTask.maybeUpdateReadOffset$1(RemoteLogManager.scala:394)
kafka-tiered-storage-demo-kafka-1 | at kafka.log.remote.RemoteLogManager$RLMTask.copyLogSegmentsToRemote(RemoteLogManager.scala:399)
kafka-tiered-storage-demo-kafka-1 | at kafka.log.remote.RemoteLogManager$RLMTask.run(RemoteLogManager.scala:576)
The text was updated successfully, but these errors were encountered: