[TD-93] fix compile error
This commit is contained in:
parent
792cc85f1b
commit
c4b6bfd922
|
@ -645,22 +645,18 @@ static int32_t mgmtRetrieveDbs(SShowObj *pShow, char *data, int32_t rows, void *
|
||||||
|
|
||||||
void mgmtAddSuperTableIntoDb(SDbObj *pDb) {
|
void mgmtAddSuperTableIntoDb(SDbObj *pDb) {
|
||||||
atomic_add_fetch_32(&pDb->numOfSuperTables, 1);
|
atomic_add_fetch_32(&pDb->numOfSuperTables, 1);
|
||||||
mgmtIncDbRef(pDb);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mgmtRemoveSuperTableFromDb(SDbObj *pDb) {
|
void mgmtRemoveSuperTableFromDb(SDbObj *pDb) {
|
||||||
atomic_add_fetch_32(&pDb->numOfSuperTables, -1);
|
atomic_add_fetch_32(&pDb->numOfSuperTables, -1);
|
||||||
mgmtDecDbRef(pDb);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mgmtAddTableIntoDb(SDbObj *pDb) {
|
void mgmtAddTableIntoDb(SDbObj *pDb) {
|
||||||
atomic_add_fetch_32(&pDb->numOfTables, 1);
|
atomic_add_fetch_32(&pDb->numOfTables, 1);
|
||||||
mgmtIncDbRef(pDb);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mgmtRemoveTableFromDb(SDbObj *pDb) {
|
void mgmtRemoveTableFromDb(SDbObj *pDb) {
|
||||||
atomic_add_fetch_32(&pDb->numOfTables, -1);
|
atomic_add_fetch_32(&pDb->numOfTables, -1);
|
||||||
mgmtDecDbRef(pDb);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t mgmtSetDbDirty(SDbObj *pDb) {
|
static int32_t mgmtSetDbDirty(SDbObj *pDb) {
|
||||||
|
|
|
@ -987,7 +987,6 @@ int32_t mgmtRetrieveShowSuperTables(SShowObj *pShow, char *data, int32_t rows, v
|
||||||
char stableName[TSDB_TABLE_NAME_LEN] = {0};
|
char stableName[TSDB_TABLE_NAME_LEN] = {0};
|
||||||
|
|
||||||
while (numOfRows < rows) {
|
while (numOfRows < rows) {
|
||||||
mgmtDecTableRef(pTable);
|
|
||||||
pShow->pNode = sdbFetchRow(tsSuperTableSdb, pShow->pNode, (void **) &pTable);
|
pShow->pNode = sdbFetchRow(tsSuperTableSdb, pShow->pNode, (void **) &pTable);
|
||||||
if (pTable == NULL) break;
|
if (pTable == NULL) break;
|
||||||
if (strncmp(pTable->info.tableId, prefix, prefixLen)) {
|
if (strncmp(pTable->info.tableId, prefix, prefixLen)) {
|
||||||
|
@ -1024,6 +1023,8 @@ int32_t mgmtRetrieveShowSuperTables(SShowObj *pShow, char *data, int32_t rows, v
|
||||||
cols++;
|
cols++;
|
||||||
|
|
||||||
numOfRows++;
|
numOfRows++;
|
||||||
|
mgmtDecTableRef(pTable);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pShow->numOfReads += numOfRows;
|
pShow->numOfReads += numOfRows;
|
||||||
|
@ -1887,7 +1888,6 @@ static int32_t mgmtRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows,
|
||||||
int32_t prefixLen = strlen(prefix);
|
int32_t prefixLen = strlen(prefix);
|
||||||
|
|
||||||
while (numOfRows < rows) {
|
while (numOfRows < rows) {
|
||||||
mgmtDecTableRef(pTable);
|
|
||||||
pShow->pNode = sdbFetchRow(tsChildTableSdb, pShow->pNode, (void **) &pTable);
|
pShow->pNode = sdbFetchRow(tsChildTableSdb, pShow->pNode, (void **) &pTable);
|
||||||
if (pTable == NULL) break;
|
if (pTable == NULL) break;
|
||||||
|
|
||||||
|
@ -1933,6 +1933,7 @@ static int32_t mgmtRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows,
|
||||||
cols++;
|
cols++;
|
||||||
|
|
||||||
numOfRows++;
|
numOfRows++;
|
||||||
|
mgmtDecTableRef(pTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
pShow->numOfReads += numOfRows;
|
pShow->numOfReads += numOfRows;
|
||||||
|
|
|
@ -101,6 +101,7 @@ static int32_t mgmtVgroupActionInsert(SSdbOperDesc *pOper) {
|
||||||
}
|
}
|
||||||
|
|
||||||
mgmtAddVgroupIntoDb(pVgroup);
|
mgmtAddVgroupIntoDb(pVgroup);
|
||||||
|
mgmtIncDbRef(pVgroup->pDb);
|
||||||
|
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -455,7 +456,6 @@ void mgmtAddTableIntoVgroup(SVgObj *pVgroup, SChildTableObj *pTable) {
|
||||||
pVgroup->numOfTables++;
|
pVgroup->numOfTables++;
|
||||||
}
|
}
|
||||||
|
|
||||||
mgmtIncVgroupRef(pVgroup);
|
|
||||||
if (pVgroup->numOfTables >= pVgroup->pDb->cfg.maxSessions)
|
if (pVgroup->numOfTables >= pVgroup->pDb->cfg.maxSessions)
|
||||||
mgmtAddVgroupIntoDbTail(pVgroup);
|
mgmtAddVgroupIntoDbTail(pVgroup);
|
||||||
}
|
}
|
||||||
|
@ -467,7 +467,6 @@ void mgmtRemoveTableFromVgroup(SVgObj *pVgroup, SChildTableObj *pTable) {
|
||||||
pVgroup->numOfTables--;
|
pVgroup->numOfTables--;
|
||||||
}
|
}
|
||||||
|
|
||||||
mgmtDecVgroupRef(pVgroup);
|
|
||||||
if (pVgroup->numOfTables >= pVgroup->pDb->cfg.maxSessions)
|
if (pVgroup->numOfTables >= pVgroup->pDb->cfg.maxSessions)
|
||||||
mgmtAddVgroupIntoDbTail(pVgroup);
|
mgmtAddVgroupIntoDbTail(pVgroup);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue