-
Notifications
You must be signed in to change notification settings - Fork 641
[ISSUE #4144] Subscription is almost impossible to be cancelled when the TCP sub client is closed #4145
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4145 +/- ##
============================================
- Coverage 16.93% 16.93% -0.01%
Complexity 1410 1410
============================================
Files 588 588
Lines 25739 25741 +2
Branches 2387 2387
============================================
Hits 4358 4358
- Misses 20946 20948 +2
Partials 435 435
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Thank you for your problem. I have checked this issue, because the reference is stored in the set, so there is no problem. You can run and verify it. |
|
@lrhkobe Thank you for your review.
I had run the |
lrhkobe
left a comment
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.
LGTM
… when the TCP sub client is closed (apache#4145) * Fix bug: suscription session can't be removed correctly. * Fix bug: suscription session can't be removed correctly. * remove the modification for other issue.
Fixes #4144.
Motivation
Subscription is almost impossible to be cancelled when the TCP sub client is closed.
Modifications
eventmesh/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/group/ClientGroupWrapper.java
Line 246 in 8843df2
The subscription session can't be removed from
ClientGroupWrapper.topic2sessionInGroupMappingcorrectly.When
Sessionis added to thetopic2sessionInGroupMapping, ajava.util.Set,Session.sessionStateisCREATED. But session is almost impossible to keep this state. It will beRUNNINGorCLOSED. So the hash ofSessionis changed.Map(the base ofSet) will be unable to find the bucket using the new hash, which is different from origin hash used when initially putting intoMap.Documentation