fix a little bug
This commit is contained in:
parent
7d006b6f8e
commit
514e6ca49f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue