未验证 提交 bfcea250 编写于 作者: M Minglei Jin 提交者: GitHub

Merge pull request #8969 from taosdata/hotfix/TS-787-D

[TS-787]<enhance>:release lock during write socket
......@@ -1502,7 +1502,10 @@ static int32_t syncForwardToPeerImpl(SSyncNode *pNode, void *data, void *mhandle
}
}
int32_t retLen = taosWriteMsg(pPeer->peerFd, pSyncHead, fwdLen);
SOCKET peerFd = pPeer->peerFd;
pthread_mutex_unlock(&pNode->mutex);
int32_t retLen = taosWriteMsg(peerFd, pSyncHead, fwdLen);
pthread_mutex_lock(&pNode->mutex);
if (retLen == fwdLen) {
sTrace("%s, forward is sent, role:%s sstatus:%s hver:%" PRIu64 " contLen:%d", pPeer->id, syncRole[pPeer->role],
syncStatus[pPeer->sstatus], pWalHead->version, pWalHead->len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册