[improve](transaction) extend abort transaction time (#28662)

This commit is contained in:
HHoflittlefish777
2023-12-21 14:01:05 +08:00
committed by GitHub
parent d11bb11592
commit 4ee661202e
4 changed files with 29 additions and 1 deletions

View File

@ -174,7 +174,8 @@ 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 && System.currentTimeMillis() - be.getLastUpdateMs() > 60 * 1000L) {
if (!isReplay && System.currentTimeMillis() - be.getLastUpdateMs()
>= Config.abort_txn_after_lost_heartbeat_time_second * 1000L) {
Env.getCurrentGlobalTransactionMgr()
.abortTxnWhenCoordinateBeDown(be.getHost(), 100);
}