sofastack / sofa-jraft

A production-grade java implementation of RAFT consensus algorithm.
https://www.sofastack.tech/projects/sofa-jraft/
Apache License 2.0
3.58k stars 1.15k forks source link

ProtobufMsgFactory#static Throwable is NOPMD? #1045

Closed funky-eyes closed 8 months ago

funky-eyes commented 10 months ago

Your question

为什么对ProtobufMsgFactory 静态代码块中初始化parse异常时,不打印日志? https://github.com/seata/seata/issues/6083 seata集成了jraft,用户在alpine linux中运行出现了,怀疑是初始化时出了异常,但是由于不打印成日志导致我们很难获取该信息

Caused by: java.lang.IllegalStateException: Parse protocol file failed.
    at com.alipay.sofa.jraft.rpc.ProtobufMsgFactory.load(ProtobufMsgFactory.java:88)
    at com.alipay.sofa.jraft.rpc.impl.AbstractClientService.<clinit>(AbstractClientService.java:63)
    ... 27 common frames omitted

Your scenes

Describe your use scenes (why need this feature)

Your advice

Describe the advice or solution you'd like

Environment

funky-eyes commented 10 months ago

@fengjiachun @killme2008 Please help with this question

killme2008 commented 10 months ago

这不是打到标准错误流了吗?

funky-eyes commented 9 months ago

@killme2008 This message doesn't tell you anything, the specific exception was caught, and this message alone doesn't help.

funky-eyes commented 8 months ago

We should have encountered the bug #1066