commit
a7aa9a2b73
|
@ -287,7 +287,7 @@ void sdbUpdateSync() {
|
||||||
SDnodeObj *pDnode = mnodeGetDnode(pMnode->mnodeId);
|
SDnodeObj *pDnode = mnodeGetDnode(pMnode->mnodeId);
|
||||||
if (pDnode != NULL) {
|
if (pDnode != NULL) {
|
||||||
syncCfg.nodeInfo[index].nodePort = pDnode->dnodePort + TSDB_PORT_SYNC;
|
syncCfg.nodeInfo[index].nodePort = pDnode->dnodePort + TSDB_PORT_SYNC;
|
||||||
strcpy(syncCfg.nodeInfo[index].nodeFqdn, pDnode->dnodeEp);
|
tstrncpy(syncCfg.nodeInfo[index].nodeFqdn, pDnode->dnodeFqdn, TSDB_FQDN_LEN);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -976,11 +976,11 @@ static void *sdbWorkerFp(void *param) {
|
||||||
tstrerror(pOper->retCode));
|
tstrerror(pOper->retCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
dnodeSendRpcMnodeWriteRsp(pOper->pMsg, pOper->retCode);
|
|
||||||
|
|
||||||
if (pOper != NULL) {
|
if (pOper != NULL) {
|
||||||
sdbDecRef(pOper->table, pOper->pObj);
|
sdbDecRef(pOper->table, pOper->pObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dnodeSendRpcMnodeWriteRsp(pOper->pMsg, pOper->retCode);
|
||||||
}
|
}
|
||||||
taosFreeQitem(item);
|
taosFreeQitem(item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1254,13 +1254,13 @@ int32_t mnodeRetrieveShowSuperTables(SShowObj *pShow, char *data, int32_t rows,
|
||||||
char * pWrite;
|
char * pWrite;
|
||||||
int32_t cols = 0;
|
int32_t cols = 0;
|
||||||
SSuperTableObj *pTable = NULL;
|
SSuperTableObj *pTable = NULL;
|
||||||
char prefix[20] = {0};
|
char prefix[64] = {0};
|
||||||
int32_t prefixLen;
|
int32_t prefixLen;
|
||||||
|
|
||||||
SDbObj *pDb = mnodeGetDb(pShow->db);
|
SDbObj *pDb = mnodeGetDb(pShow->db);
|
||||||
if (pDb == NULL) return 0;
|
if (pDb == NULL) return 0;
|
||||||
|
|
||||||
strcpy(prefix, pDb->name);
|
tstrncpy(prefix, pDb->name, 64);
|
||||||
strcat(prefix, TS_PATH_DELIMITER);
|
strcat(prefix, TS_PATH_DELIMITER);
|
||||||
prefixLen = strlen(prefix);
|
prefixLen = strlen(prefix);
|
||||||
|
|
||||||
|
@ -1558,10 +1558,10 @@ static void *mnodeBuildCreateChildTableMsg(SCMCreateTableMsg *pMsg, SChildTableO
|
||||||
|
|
||||||
static int32_t mnodeDoCreateChildTableCb(SMnodeMsg *pMsg, int32_t code) {
|
static int32_t mnodeDoCreateChildTableCb(SMnodeMsg *pMsg, int32_t code) {
|
||||||
SChildTableObj *pTable = (SChildTableObj *)pMsg->pTable;
|
SChildTableObj *pTable = (SChildTableObj *)pMsg->pTable;
|
||||||
if (pTable != NULL) {
|
assert(pTable);
|
||||||
mDebug("app:%p:%p, table:%s, create table in id:%d, uid:%" PRIu64 ", result:%s", pMsg->rpcMsg.ahandle, pMsg,
|
|
||||||
pTable->info.tableId, pTable->sid, pTable->uid, tstrerror(code));
|
mDebug("app:%p:%p, table:%s, create table in id:%d, uid:%" PRIu64 ", result:%s", pMsg->rpcMsg.ahandle, pMsg,
|
||||||
}
|
pTable->info.tableId, pTable->sid, pTable->uid, tstrerror(code));
|
||||||
|
|
||||||
if (code != TSDB_CODE_SUCCESS) return code;
|
if (code != TSDB_CODE_SUCCESS) return code;
|
||||||
|
|
||||||
|
@ -2370,7 +2370,7 @@ static int32_t mnodeRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows
|
||||||
SPatternCompareInfo info = PATTERN_COMPARE_INFO_INITIALIZER;
|
SPatternCompareInfo info = PATTERN_COMPARE_INFO_INITIALIZER;
|
||||||
|
|
||||||
char prefix[64] = {0};
|
char prefix[64] = {0};
|
||||||
strcpy(prefix, pDb->name);
|
tstrncpy(prefix, pDb->name, 64);
|
||||||
strcat(prefix, TS_PATH_DELIMITER);
|
strcat(prefix, TS_PATH_DELIMITER);
|
||||||
int32_t prefixLen = strlen(prefix);
|
int32_t prefixLen = strlen(prefix);
|
||||||
|
|
||||||
|
@ -2560,7 +2560,7 @@ static int32_t mnodeRetrieveStreamTables(SShowObj *pShow, char *data, int32_t ro
|
||||||
SPatternCompareInfo info = PATTERN_COMPARE_INFO_INITIALIZER;
|
SPatternCompareInfo info = PATTERN_COMPARE_INFO_INITIALIZER;
|
||||||
|
|
||||||
char prefix[64] = {0};
|
char prefix[64] = {0};
|
||||||
strcpy(prefix, pDb->name);
|
tstrncpy(prefix, pDb->name, 64);
|
||||||
strcat(prefix, TS_PATH_DELIMITER);
|
strcat(prefix, TS_PATH_DELIMITER);
|
||||||
int32_t prefixLen = strlen(prefix);
|
int32_t prefixLen = strlen(prefix);
|
||||||
|
|
||||||
|
|
|
@ -601,10 +601,11 @@ static int32_t vnodeReadCfg(SVnodeObj *pVnode) {
|
||||||
|
|
||||||
content = calloc(1, maxLen + 1);
|
content = calloc(1, maxLen + 1);
|
||||||
if (content == NULL) goto PARSE_OVER;
|
if (content == NULL) goto PARSE_OVER;
|
||||||
int len = fread(content, 1, maxLen, fp);
|
int len = fread(content, 1, maxLen, fp);
|
||||||
if (len <= 0) {
|
if (len <= 0) {
|
||||||
vError("vgId:%d, failed to read vnode cfg, content is null", pVnode->vgId);
|
vError("vgId:%d, failed to read vnode cfg, content is null", pVnode->vgId);
|
||||||
free(content);
|
free(content);
|
||||||
|
fclose(fp);
|
||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -649,7 +650,7 @@ static int32_t vnodeReadCfg(SVnodeObj *pVnode) {
|
||||||
}
|
}
|
||||||
pVnode->tsdbCfg.maxTables = maxTables->valueint;
|
pVnode->tsdbCfg.maxTables = maxTables->valueint;
|
||||||
|
|
||||||
cJSON *daysPerFile = cJSON_GetObjectItem(root, "daysPerFile");
|
cJSON *daysPerFile = cJSON_GetObjectItem(root, "daysPerFile");
|
||||||
if (!daysPerFile || daysPerFile->type != cJSON_Number) {
|
if (!daysPerFile || daysPerFile->type != cJSON_Number) {
|
||||||
vError("vgId:%d, failed to read vnode cfg, daysPerFile not found", pVnode->vgId);
|
vError("vgId:%d, failed to read vnode cfg, daysPerFile not found", pVnode->vgId);
|
||||||
goto PARSE_OVER;
|
goto PARSE_OVER;
|
||||||
|
|
Loading…
Reference in New Issue