[Discuss] Error interrupt LoadRetriever loop
Closed this issue · 10 comments
Hi, AutoMQ community, an Error
will causes the loop to exit, maybe need catch it let the task continue or provide metrics for task state.
Detail see,
automq/core/src/main/java/kafka/autobalancer/LoadRetriever.java
Lines 431 to 435 in baf30f0
@Wzy19930507 good point, although it's unlikely to be able to continue the task when any Error occurs during runtime (such as OOM or stackoverflow), it's worth log it for diagnose.
BTW pls let us know if you're insterested in solving this issue by yourself (so I can assign it to you), new contributor is always welcomed in AutoMQ community
Why is there a problem with this code? schedule
has made it reconsume after 1 second.
Why is there a problem with this code?
schedule
has made it reconsume after 1 second.
The current implementation only catches Exception
, not Error
Why is there a problem with this code?
schedule
has made it reconsume after 1 second.The current implementation only catches
Exception
, notError
Could there be an exception in this logic that would throw a non-inherited Exception
?
KafkaException
unified inheritance to RuntimeException
Why is there a problem with this code?
schedule
has made it reconsume after 1 second.The current implementation only catches
Exception
, notError
Could there be an exception in this logic that would throw a non-inherited
Exception
?
It's possible, although very rare, to throw an Error
, which is an inheritance of Throwable
, for example OutOfMemoryError
BTW pls let us know if you're insterested in solving this issue by yourself (so I can assign it to you), new contributor is always welcomed in AutoMQ community
I'm insterested, please assign it to me, thanks!
@SCNieh Hello, Please look at it for me, i run ./gradlew core:test
failed with some exception.
when quorum=kraft
java.lang.IllegalStateException: AwsCredentialsProvider has not been initialized
at com.automq.s3shell.sdk.auth.CredentialsProviderHolder.getAwsCredentialsProvider(CredentialsProviderHolder.java:25)
at org.apache.kafka.controller.QuorumController.<init>(QuorumController.java:2098)
at org.apache.kafka.controller.QuorumController$Builder.build(QuorumController.java:484)
at kafka.server.ControllerServer.startup(ControllerServer.scala:296)
BrokerApiVersionsCommandTest.checkBrokerApiVersionCommandOutput, when quorum=zk
expected: < DeleteStreams(504): UNSUPPORTED,> but was: < OpenStreams(502): UNSUPPORTED,>
Expected : DeleteStreams(504): UNSUPPORTED,
Actual : OpenStreams(502): UNSUPPORTED,
Did I miss some configuration?
@SCNieh Hello, Please look at it for me, i run
./gradlew core:test
failed with some exception.when quorum=kraft
java.lang.IllegalStateException: AwsCredentialsProvider has not been initialized at com.automq.s3shell.sdk.auth.CredentialsProviderHolder.getAwsCredentialsProvider(CredentialsProviderHolder.java:25) at org.apache.kafka.controller.QuorumController.<init>(QuorumController.java:2098) at org.apache.kafka.controller.QuorumController$Builder.build(QuorumController.java:484) at kafka.server.ControllerServer.startup(ControllerServer.scala:296)
BrokerApiVersionsCommandTest.checkBrokerApiVersionCommandOutput, when quorum=zk
expected: < DeleteStreams(504): UNSUPPORTED,> but was: < OpenStreams(502): UNSUPPORTED,> Expected : DeleteStreams(504): UNSUPPORTED, Actual : OpenStreams(502): UNSUPPORTED,
Did I miss some configuration?
@Wzy19930507 Some of the unit tests from Apacha Kafka has not yet been made compatible with AutoMQ and we're still working on it. You can try something like ./gradlew core:S3UnitTest
to run tests that're related to AutoMQ under core
module, or ./gradlew s3stream:test
to run tests under s3stream
It's possible, although very rare, to throw an
Error
, which is an inheritance ofThrowable
, for example OutOfMemoryError
Some unrecoverable exceptions, I believe, should not continue the loop. Of course, we can wait to see how they are handled after the PR is submitted before making a decision.