fix commit assert error
This commit is contained in:
parent
2c0b06adb2
commit
8336bbcf27
|
@ -222,11 +222,12 @@ int tsdbAsyncCommit(STsdbRepo *pRepo) {
|
||||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
pRepo->commit = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(pRepo->commit == 0);
|
ASSERT(pRepo->commit == 0);
|
||||||
if (pRepo->appH.notifyStatus) pRepo->appH.notifyStatus(pRepo->appH.appH, TSDB_STATUS_COMMIT_START);
|
|
||||||
if (pRepo->mem != NULL) {
|
if (pRepo->mem != NULL) {
|
||||||
|
if (pRepo->appH.notifyStatus) pRepo->appH.notifyStatus(pRepo->appH.appH, TSDB_STATUS_COMMIT_START);
|
||||||
if (tsdbLockRepo(pRepo) < 0) return -1;
|
if (tsdbLockRepo(pRepo) < 0) return -1;
|
||||||
pRepo->imem = pRepo->mem;
|
pRepo->imem = pRepo->mem;
|
||||||
pRepo->mem = NULL;
|
pRepo->mem = NULL;
|
||||||
|
@ -468,9 +469,6 @@ _err:
|
||||||
|
|
||||||
static void tsdbEndCommit(STsdbRepo *pRepo) {
|
static void tsdbEndCommit(STsdbRepo *pRepo) {
|
||||||
ASSERT(pRepo->commit == 1);
|
ASSERT(pRepo->commit == 1);
|
||||||
tsdbLockRepo(pRepo);
|
|
||||||
pRepo->commit = 0;
|
|
||||||
tsdbUnlockRepo(pRepo);
|
|
||||||
if (pRepo->appH.notifyStatus) pRepo->appH.notifyStatus(pRepo->appH.appH, TSDB_STATUS_COMMIT_OVER);
|
if (pRepo->appH.notifyStatus) pRepo->appH.notifyStatus(pRepo->appH.appH, TSDB_STATUS_COMMIT_OVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue