-
Notifications
You must be signed in to change notification settings - Fork 642
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
[ISSUE #476] Biz Exceptions occured in EventMesh cause connection close of client #477
Conversation
…develop � Conflicts: � eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/consumer/EventMeshConsumer.java � eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/group/ClientGroupWrapper.java � eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/session/Session.java � eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/task/MessageTransferTask.java
Codecov Report
@@ Coverage Diff @@
## develop #477 +/- ##
=============================================
+ Coverage 9.87% 11.23% +1.36%
- Complexity 283 326 +43
=============================================
Files 228 228
Lines 10798 10816 +18
Branches 907 907
=============================================
+ Hits 1066 1215 +149
+ Misses 9635 9504 -131
Partials 97 97
Continue to review full report at Codecov.
|
@@ -77,8 +76,45 @@ protected void channelRead0(ChannelHandlerContext ctx, Package pkg) throws Excep | |||
dispatch(ctx, pkg, startTime, cmd); | |||
} catch (Exception e) { | |||
logger.error("exception occurred while pkg|cmd={}|pkg={}|errMsg={}", cmd, pkg, e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The errMsg={}
in the error log is redundant. It is better midify to
logger.error("exception occurred while pkg|cmd={}|pkg={}", cmd, pkg, e);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I got it, and I will fix it later.
…on close of client (apache#477) * modify:optimize flow control in downstreaming msg * modify:optimize stategy of selecting session in downstream msg * modify:optimize msg downstream,msg store in session * modify:fix bug:not a @sharable handler * modify:downstream broadcast msg asynchronously * modify:remove unneccessary interface in eventmesh-connector-api * modify:fix conflict * modify:add license in EventMeshAction * modify:fix ack problem * modify:fix exception handle when exception occured in EventMeshTcpMessageDispatcher * modify:fix log print close apache#476
…se of client (#477) * modify:optimize flow control in downstreaming msg * modify:optimize stategy of selecting session in downstream msg * modify:optimize msg downstream,msg store in session * modify:fix bug:not a @sharable handler * modify:downstream broadcast msg asynchronously * modify:remove unneccessary interface in eventmesh-connector-api * modify:fix conflict * modify:add license in EventMeshAction * modify:fix ack problem * modify:fix exception handle when exception occured in EventMeshTcpMessageDispatcher * modify:fix log print close #476
Fixes ISSUE #476
Motivation
When the biz exception occured in EventMesh, such as, if throwing the ThreadPoolRejectException in the code of
eventMeshTCPServer.getTaskHandleExecutorService().submit(task)
, it will cause the connection close of client. This looks obviously unreasonable.Modifications
Catch the biz exception of EventMesh, and send the exception msg to client, not close the connection of client