提交 258c221a 编写于 作者: H Haojun Liao

[td-255] refactor code.

上级 626cd4cc
...@@ -8701,13 +8701,10 @@ static int32_t doLoadAllTableMeta(SSqlObj* pSql, SQueryInfo* pQueryInfo, SSqlNod ...@@ -8701,13 +8701,10 @@ static int32_t doLoadAllTableMeta(SSqlObj* pSql, SQueryInfo* pQueryInfo, SSqlNod
assert(existVgroupInfo.inUse >= 0); assert(existVgroupInfo.inUse >= 0);
SVgroupMsg *pVgroup = &pTableMetaInfo->vgroupList->vgroups[j]; SVgroupMsg *pVgroup = &pTableMetaInfo->vgroupList->vgroups[j];
memcpy(pVgroup, &existVgroupInfo, sizeof(SVgroupMsg));
// pVgroup->numOfEps = existVgroupInfo.numOfEps; pVgroup->numOfEps = existVgroupInfo.numOfEps;
// pVgroup->vgId = existVgroupInfo.vgId; pVgroup->vgId = existVgroupInfo.vgId;
// for (int32_t k = 0; k < existVgroupInfo.numOfEps; ++k) { memcpy(&pVgroup->epAddr, &existVgroupInfo.ep, sizeof(pVgroup->epAddr));
// pVgroup->epAddr[k].port = existVgroupInfo.ep[k].port;
// pVgroup->epAddr[k].fqdn = strndup(existVgroupInfo.ep[k].fqdn, TSDB_FQDN_LEN);
// }
} }
} }
} }
......
...@@ -588,8 +588,8 @@ static bool tscKillQueryInDnode(SSqlObj* pSql) { ...@@ -588,8 +588,8 @@ static bool tscKillQueryInDnode(SSqlObj* pSql) {
pCmd->command = (pCmd->command > TSDB_SQL_MGMT) ? TSDB_SQL_RETRIEVE : TSDB_SQL_FETCH; pCmd->command = (pCmd->command > TSDB_SQL_MGMT) ? TSDB_SQL_RETRIEVE : TSDB_SQL_FETCH;
tscDebug("0x%"PRIx64" send msg to dnode to free qhandle ASAP before free sqlObj, command:%s", pSql->self, sqlCmd[pCmd->command]); tscDebug("0x%"PRIx64" send msg to dnode to free qhandle ASAP before free sqlObj, command:%s", pSql->self, sqlCmd[pCmd->command]);
// tscBuildAndSendRequest(pSql, NULL); tscBuildAndSendRequest(pSql, NULL);
// return false; return false;
} }
return true; return true;
......
...@@ -748,7 +748,6 @@ void tscBuildVgroupTableInfo(SSqlObj* pSql, STableMetaInfo* pTableMetaInfo, SArr ...@@ -748,7 +748,6 @@ void tscBuildVgroupTableInfo(SSqlObj* pSql, STableMetaInfo* pTableMetaInfo, SArr
for (int32_t m = 0; m < pvg->numOfVgroups; ++m) { for (int32_t m = 0; m < pvg->numOfVgroups; ++m) {
if (tt->vgId == pvg->vgroups[m].vgId) { if (tt->vgId == pvg->vgroups[m].vgId) {
memcpy(&info.vgInfo, &pvg->vgroups[m], sizeof(info.vgInfo)); memcpy(&info.vgInfo, &pvg->vgroups[m], sizeof(info.vgInfo));
// tscSVgroupInfoCopy(&info.vgInfo, &pvg->vgroups[m]);
break; break;
} }
} }
...@@ -2579,9 +2578,6 @@ int32_t tscHandleMasterSTableQuery(SSqlObj *pSql) { ...@@ -2579,9 +2578,6 @@ int32_t tscHandleMasterSTableQuery(SSqlObj *pSql) {
tscDebug("0x%"PRIx64" sub:0x%"PRIx64" create subquery success. orderOfSub:%d", pSql->self, pNew->self, tscDebug("0x%"PRIx64" sub:0x%"PRIx64" create subquery success. orderOfSub:%d", pSql->self, pNew->self,
trs->subqueryIndex); trs->subqueryIndex);
tfree(trs->localBuffer);
tfree(trs);
} }
if (i < pState->numOfSub) { if (i < pState->numOfSub) {
...@@ -2599,8 +2595,7 @@ int32_t tscHandleMasterSTableQuery(SSqlObj *pSql) { ...@@ -2599,8 +2595,7 @@ int32_t tscHandleMasterSTableQuery(SSqlObj *pSql) {
return pRes->code; return pRes->code;
} }
pSql->fp(pSql->param, pSql, 0); doConcurrentlySendSubQueries(pSql);
// doConcurrentlySendSubQueries(pSql);
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
......
...@@ -766,12 +766,6 @@ typedef struct SSTableVgroupMsg { ...@@ -766,12 +766,6 @@ typedef struct SSTableVgroupMsg {
int32_t numOfTables; int32_t numOfTables;
} SSTableVgroupMsg, SSTableVgroupRspMsg; } SSTableVgroupMsg, SSTableVgroupRspMsg;
//typedef struct {
// int32_t vgId;
// int8_t numOfEps;
// SEpAddr1 epAddr[TSDB_MAX_REPLICA];
//} SVgroupInfo;
typedef struct { typedef struct {
int32_t vgId; int32_t vgId;
int8_t numOfEps; int8_t numOfEps;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册