Merge pull request #24698 from taosdata/FIX/TD-28529-3.0

fix: reset sync timer although failed to enqueue since out of memory in rpc queue
This commit is contained in:
wade zhang 2024-02-01 15:13:18 +08:00 committed by GitHub
commit 70a2674315
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 4 deletions

View File

@ -2141,7 +2141,7 @@ static void syncNodeEqPingTimer(void* param, void* tmrId) {
if (code != 0) {
sError("failed to build ping msg");
rpcFreeCont(rpcMsg.pCont);
return;
goto _out;
}
// sTrace("enqueue ping msg");
@ -2149,9 +2149,10 @@ static void syncNodeEqPingTimer(void* param, void* tmrId) {
if (code != 0) {
sError("failed to sync enqueue ping msg since %s", terrstr());
rpcFreeCont(rpcMsg.pCont);
return;
goto _out;
}
_out:
taosTmrReset(syncNodeEqPingTimer, pNode->pingTimerMS, pNode, syncEnv()->pTimerManager, &pNode->pPingTimer);
}
}
@ -2211,7 +2212,7 @@ static void syncNodeEqHeartbeatTimer(void* param, void* tmrId) {
if (code != 0) {
sError("failed to build heartbeat msg");
return;
goto _out;
}
sTrace("vgId:%d, enqueue heartbeat timer", pNode->vgId);
@ -2219,9 +2220,10 @@ static void syncNodeEqHeartbeatTimer(void* param, void* tmrId) {
if (code != 0) {
sError("failed to enqueue heartbeat msg since %s", terrstr());
rpcFreeCont(rpcMsg.pCont);
return;
goto _out;
}
_out:
taosTmrReset(syncNodeEqHeartbeatTimer, pNode->heartbeatTimerMS, pNode, syncEnv()->pTimerManager,
&pNode->pHeartbeatTimer);