[improvement](transaction) abort txn when be lost heartbeat over 1 min (#22781)

This commit is contained in:
yujun
2023-08-10 12:04:42 +08:00
committed by GitHub
parent 432c8f1d6a
commit 35dd787ed7

View File

@ -172,7 +172,7 @@ public class HeartbeatMgr extends MasterDaemon {
if (hbResponse.getStatus() != HbStatus.OK) {
// invalid all connections cached in ClientPool
ClientPool.backendPool.clearPool(new TNetworkAddress(be.getHost(), be.getBePort()));
if (!isReplay) {
if (!isReplay && System.currentTimeMillis() - be.getLastUpdateMs() > 60 * 1000L) {
Env.getCurrentEnv().getGlobalTransactionMgr()
.abortTxnWhenCoordinateBeDown(be.getHost(), 100);
}