apache / apache/incubator-seata

seata all 1.6 at模式 在transport.heartbeat=false时出现channel不断重复删除和注册的bug

Open
#5,387 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
26k
Forks
8.8k
Avg merge
1d 8h
Merged PRs (30d)
4

Description

//file.conf
```
transport {
# tcp udt unix-domain-socket
type = "TCP"
enableRmClientBatchSendRequest = true
enableTmClientBatchSendRequest = true
#NIO NATIVE
server = "NIO"
#enable heartbeat
heartbeat = false //设置为false会引起channel不断重复删除和注册
#thread factory for netty
threadFactory {
bossThreadPrefix = "NettyBoss"
workerThreadPrefix = "NettyServerNIOWorker"
serverExecutorThread-prefix = "NettyServerBizHandler"
shareBossWorker = false
clientSelectorThreadPrefix = "NettyClientSelector"
clientSelectorThreadSize = 1
clientWorkerThreadPrefix = "NettyClientWorkerThread"
# netty boss thread size,will not be used for UDT
bossThreadSize = 1
#auto default pin or 8
workerThreadSize = "default"
}
}
service {
#vgroup->rgroup
vgroupMapping.my_test_tx_group = "default"
#only support single node
#default.grouplist = "127.0.0.1:8091"
#degrade current not support
enableDegrade = false
#disable
disable = false
}

client {
rm {
asyncCommitBufferLimit = 10000
lock {
retryInterval = 10
retryTimes = 1
retryPolicyBranchRollbackOnConflict = true
}
reportRetryCount = 1
tableMetaCheckEnable = false
reportSuccessEnable = true
}
tm {
defaultGlobalTransactionTimeout = 180000
commitRetryCount = 1
rollbackRetryCount = 1
}

undo {
dataValidation = true
logSerialization = "jackson"
logTable = "undo_log"
}
log {
exceptionRate = 100
}
}
```

上面是我file.conf文件,在transport.heartbeat=false时channel会不断重复删除和注册。seata服务器控制台输出的日志如下:

![image](https://user-images.githubusercontent.com/78004279/220823475-7072a25d-26bc-40e8-b107-736d03cb5bac.png)

上图表现为channel不断变成 inactive,然后被删除,并且 TM 不断注册,感觉应该是个bug。

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the supplied file.conf, focusing on transport.heartbeat=false, and compare the server console logs with heartbeat enabled. Trace the channel inactive, deletion, and TM registration sequence; done means channels remain registered without repeated deletion and registration when heartbeat is disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.