[TD-4556]add compact flag in STsdbRepo
This commit is contained in:
parent
efa03cb0f4
commit
e2831b4833
|
@ -92,6 +92,7 @@ struct STsdbRepo {
|
||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
bool repoLocked;
|
bool repoLocked;
|
||||||
int32_t code; // Commit code
|
int32_t code; // Commit code
|
||||||
|
bool inCompact; // is in compact process?
|
||||||
};
|
};
|
||||||
|
|
||||||
#define REPO_ID(r) (r)->config.tsdbId
|
#define REPO_ID(r) (r)->config.tsdbId
|
||||||
|
|
|
@ -533,6 +533,7 @@ static STsdbRepo *tsdbNewRepo(STsdbCfg *pCfg, STsdbAppH *pAppH) {
|
||||||
|
|
||||||
pRepo->state = TSDB_STATE_OK;
|
pRepo->state = TSDB_STATE_OK;
|
||||||
pRepo->code = TSDB_CODE_SUCCESS;
|
pRepo->code = TSDB_CODE_SUCCESS;
|
||||||
|
pRepo->inCompact = false;
|
||||||
pRepo->config = *pCfg;
|
pRepo->config = *pCfg;
|
||||||
if (pAppH) {
|
if (pAppH) {
|
||||||
pRepo->appH = *pAppH;
|
pRepo->appH = *pAppH;
|
||||||
|
|
Loading…
Reference in New Issue