[TD-5664]<feature> add more state of compact

This commit is contained in:
yihaoDeng 2021-07-29 05:00:30 +08:00
parent 3dcce3dcf6
commit f25a01f83a
1 changed files with 4 additions and 0 deletions

View File

@ -90,6 +90,10 @@ _err:
}
static int tsdbAsyncCompact(STsdbRepo *pRepo) {
if (pRepo->compactState != TSDB_NO_COMPACT) {
tsdbInfo("vgId:%d not compact tsdb again", REPO_ID(pRepo));
return 0;
}
pRepo->compactState = TSDB_WAITING_COMPACT;
tsem_wait(&(pRepo->readyToCommit));
return tsdbScheduleCommit(pRepo, COMPACT_REQ);