提交 514e6ca4 编写于 作者: H Hongze Cheng

fix a little bug

上级 7d006b6f
......@@ -49,7 +49,7 @@ int tsdbSyncSend(STsdbRepo *pRepo, int socketFd) {
tsdbInitSyncH(&synch, pRepo, socketFd);
// Disable TSDB commit
sem_post(&(pRepo->readyToCommit));
sem_wait(&(pRepo->readyToCommit));
if (tsdbSyncSendMeta(&synch) < 0) {
tsdbError("vgId:%d failed to send meta file since %s", REPO_ID(pRepo), tstrerror(terrno));
......@@ -62,12 +62,12 @@ int tsdbSyncSend(STsdbRepo *pRepo, int socketFd) {
}
// Enable TSDB commit
sem_wait(&(pRepo->readyToCommit));
sem_post(&(pRepo->readyToCommit));
tsdbDestroySyncH(&synch);
return 0;
_err:
sem_wait(&(pRepo->readyToCommit));
sem_post(&(pRepo->readyToCommit));
tsdbDestroySyncH(&synch);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册