fix(stream): remove invalid lock, and fix a typo.

This commit is contained in:
Haojun Liao 2024-01-16 14:52:27 +08:00
parent 80793c94c2
commit 9a4b7a6d82
2 changed files with 2 additions and 5 deletions

View File

@ -989,8 +989,5 @@ int32_t tqStreamTaskProcessTaskResumeReq(void* handle, int64_t sversion, char* m
} }
int32_t tqStreamTasksGetTotalNum(SStreamMeta* pMeta) { int32_t tqStreamTasksGetTotalNum(SStreamMeta* pMeta) {
streamMetaRLock(pMeta); return taosArrayGetSize(pMeta->pTaskList);
int32_t num = taosArrayGetSize(pMeta->pTaskList);
streamMetaRUnLock(pMeta);
return num;
} }

View File

@ -676,7 +676,7 @@ int32_t syncNodePropose(SSyncNode* pSyncNode, SRpcMsg* pMsg, bool isWeak, int64_
// heartbeat timeout // heartbeat timeout
if (syncNodeHeartbeatReplyTimeout(pSyncNode)) { if (syncNodeHeartbeatReplyTimeout(pSyncNode)) {
terrno = TSDB_CODE_SYN_PROPOSE_NOT_READY; terrno = TSDB_CODE_SYN_PROPOSE_NOT_READY;
sNError(pSyncNode, "failed to sync propose since hearbeat timeout, type:%s, last:%" PRId64 ", cmt:%" PRId64, sNError(pSyncNode, "failed to sync propose since heartbeat timeout, type:%s, last:%" PRId64 ", cmt:%" PRId64,
TMSG_INFO(pMsg->msgType), syncNodeGetLastIndex(pSyncNode), pSyncNode->commitIndex); TMSG_INFO(pMsg->msgType), syncNodeGetLastIndex(pSyncNode), pSyncNode->commitIndex);
return -1; return -1;
} }