Skip to content
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

bugfix: fix TMClinet reconnect exception #1269

Merged
merged 7 commits into from
Jul 5, 2019

Conversation

xionganyin
Copy link
Contributor

@xionganyin xionganyin commented Jul 5, 2019

TMClient发送消息到TC端,如果TC端返回的Response中resultCode字段值为Failed时,TM端的重连会报
io.seata.common.exception.FrameworkException: can not register RM,err:Timeout waiting for idle object。原因是TM端的Netty连接池maxActive配置为1,TC返回失败后,TMClient会归还连接到连接池。同时清除掉该Channel,但是在没分钟一次的reconnect操作时,并没有将创建的Channel放入Channel缓存池,导致后面的所有Channel都是基于连接池创建

@codecov-io
Copy link

codecov-io commented Jul 5, 2019

Codecov Report

Merging #1269 into develop will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1269      +/-   ##
=============================================
+ Coverage       49.4%   49.42%   +0.02%     
  Complexity      1651     1651              
=============================================
  Files            326      326              
  Lines          11448    11445       -3     
  Branches        1416     1416              
=============================================
+ Hits            5656     5657       +1     
+ Misses          5162     5158       -4     
  Partials         630      630
Impacted Files Coverage Δ Complexity Δ
...eata/core/rpc/netty/NettyClientChannelManager.java 70.53% <100%> (+0.26%) 22 <0> (ø) ⬇️
...seata/core/exception/AbstractExceptionHandler.java 0% <0%> (ø) 0% <0%> (ø) ⬇️
...java/io/seata/rm/datasource/ConnectionContext.java 13.63% <0%> (+0.3%) 3% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5573038...7e3491f. Read the comment docs.

@slievrly
Copy link
Member

slievrly commented Jul 5, 2019

归还连接,连接正常可用,再次取连接不走makeObj,所以导致channeMap为空。

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@sharajava sharajava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's okey to me.

@slievrly slievrly merged commit 3e72c59 into apache:develop Jul 5, 2019
@leizhiyuan leizhiyuan modified the milestone: 0.7.0 Jul 10, 2019
nick-tan pushed a commit to nick-tan/seata that referenced this pull request Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants