fix: remove not used code
This commit is contained in:
parent
78ff5f75e7
commit
ba0913e645
|
@ -90,7 +90,7 @@ int32_t qndProcessQueryMsg(SQnode *pQnode, int64_t ts, SRpcMsg *pMsg) {
|
||||||
code = qWorkerProcessFetchMsg(pQnode, pQnode->pQuery, pMsg, ts);
|
code = qWorkerProcessFetchMsg(pQnode, pQnode->pQuery, pMsg, ts);
|
||||||
break;
|
break;
|
||||||
case TDMT_SCH_CANCEL_TASK:
|
case TDMT_SCH_CANCEL_TASK:
|
||||||
code = qWorkerProcessCancelMsg(pQnode, pQnode->pQuery, pMsg, ts);
|
//code = qWorkerProcessCancelMsg(pQnode, pQnode->pQuery, pMsg, ts);
|
||||||
break;
|
break;
|
||||||
case TDMT_SCH_DROP_TASK:
|
case TDMT_SCH_DROP_TASK:
|
||||||
code = qWorkerProcessDropMsg(pQnode, pQnode->pQuery, pMsg, ts);
|
code = qWorkerProcessDropMsg(pQnode, pQnode->pQuery, pMsg, ts);
|
||||||
|
|
|
@ -369,8 +369,8 @@ int32_t vnodeProcessFetchMsg(SVnode *pVnode, SRpcMsg *pMsg, SQueueInfo *pInfo) {
|
||||||
return qWorkerProcessFetchMsg(pVnode, pVnode->pQuery, pMsg, 0);
|
return qWorkerProcessFetchMsg(pVnode, pVnode->pQuery, pMsg, 0);
|
||||||
case TDMT_SCH_FETCH_RSP:
|
case TDMT_SCH_FETCH_RSP:
|
||||||
return qWorkerProcessRspMsg(pVnode, pVnode->pQuery, pMsg, 0);
|
return qWorkerProcessRspMsg(pVnode, pVnode->pQuery, pMsg, 0);
|
||||||
case TDMT_SCH_CANCEL_TASK:
|
//case TDMT_SCH_CANCEL_TASK:
|
||||||
return qWorkerProcessCancelMsg(pVnode, pVnode->pQuery, pMsg, 0);
|
// return qWorkerProcessCancelMsg(pVnode, pVnode->pQuery, pMsg, 0);
|
||||||
case TDMT_SCH_DROP_TASK:
|
case TDMT_SCH_DROP_TASK:
|
||||||
return qWorkerProcessDropMsg(pVnode, pVnode->pQuery, pMsg, 0);
|
return qWorkerProcessDropMsg(pVnode, pVnode->pQuery, pMsg, 0);
|
||||||
case TDMT_SCH_QUERY_HEARTBEAT:
|
case TDMT_SCH_QUERY_HEARTBEAT:
|
||||||
|
|
|
@ -57,6 +57,7 @@ enum {
|
||||||
CTGT_RSP_CTBMETA,
|
CTGT_RSP_CTBMETA,
|
||||||
CTGT_RSP_STBMETA,
|
CTGT_RSP_STBMETA,
|
||||||
CTGT_RSP_MSTBMETA,
|
CTGT_RSP_MSTBMETA,
|
||||||
|
CTGT_RSP_INDEXINFO_E,
|
||||||
CTGT_RSP_TBMETA_NOT_EXIST,
|
CTGT_RSP_TBMETA_NOT_EXIST,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -507,6 +508,14 @@ void ctgTestRspMultiSTableMeta(void *shandle, SEpSet *pEpSet, SRpcMsg *pMsg, SRp
|
||||||
tFreeSTableMetaRsp(&metaRsp);
|
tFreeSTableMetaRsp(&metaRsp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ctgTestRspErrIndexInfo(void *shandle, SEpSet *pEpSet, SRpcMsg *pMsg, SRpcMsg *pRsp) {
|
||||||
|
pRsp->code = TSDB_CODE_MND_DB_INDEX_NOT_EXIST;
|
||||||
|
pRsp->contLen = 0;
|
||||||
|
pRsp->pCont = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ctgTestRspByIdx(void *shandle, SEpSet *pEpSet, SRpcMsg *pMsg, SRpcMsg *pRsp) {
|
void ctgTestRspByIdx(void *shandle, SEpSet *pEpSet, SRpcMsg *pMsg, SRpcMsg *pRsp) {
|
||||||
switch (ctgTestRspFunc[ctgTestRspIdx]) {
|
switch (ctgTestRspFunc[ctgTestRspIdx]) {
|
||||||
case CTGT_RSP_VGINFO:
|
case CTGT_RSP_VGINFO:
|
||||||
|
@ -524,6 +533,9 @@ void ctgTestRspByIdx(void *shandle, SEpSet *pEpSet, SRpcMsg *pMsg, SRpcMsg *pRsp
|
||||||
case CTGT_RSP_MSTBMETA:
|
case CTGT_RSP_MSTBMETA:
|
||||||
ctgTestRspMultiSTableMeta(shandle, pEpSet, pMsg, pRsp);
|
ctgTestRspMultiSTableMeta(shandle, pEpSet, pMsg, pRsp);
|
||||||
break;
|
break;
|
||||||
|
case CTGT_RSP_INDEXINFO_E:
|
||||||
|
ctgTestRspErrIndexInfo(shandle, pEpSet, pMsg, pRsp);
|
||||||
|
break;
|
||||||
case CTGT_RSP_TBMETA_NOT_EXIST:
|
case CTGT_RSP_TBMETA_NOT_EXIST:
|
||||||
ctgTestRspTableMetaNotExist(shandle, pEpSet, pMsg, pRsp);
|
ctgTestRspTableMetaNotExist(shandle, pEpSet, pMsg, pRsp);
|
||||||
break;
|
break;
|
||||||
|
@ -1412,6 +1424,33 @@ TEST(tableMeta, updateStbMeta) {
|
||||||
memset(&gCtgMgmt.stat, 0, sizeof(gCtgMgmt.stat));
|
memset(&gCtgMgmt.stat, 0, sizeof(gCtgMgmt.stat));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(getIndexInfo, notExists) {
|
||||||
|
struct SCatalog *pCtg = NULL;
|
||||||
|
SRequestConnInfo *mockPointer = (SRequestConnInfo *)0x1;
|
||||||
|
SVgroupInfo vgInfo = {0};
|
||||||
|
SArray *vgList = NULL;
|
||||||
|
|
||||||
|
ctgTestInitLogFile();
|
||||||
|
|
||||||
|
memset(ctgTestRspFunc, 0, sizeof(ctgTestRspFunc));
|
||||||
|
ctgTestRspIdx = 0;
|
||||||
|
ctgTestRspFunc[0] = CTGT_RSP_INDEXINFO_E;
|
||||||
|
|
||||||
|
ctgTestSetRspByIdx();
|
||||||
|
|
||||||
|
initQueryModuleMsgHandle();
|
||||||
|
|
||||||
|
int32_t code = catalogInit(NULL);
|
||||||
|
ASSERT_EQ(code, 0);
|
||||||
|
|
||||||
|
code = catalogGetHandle(ctgTestClusterId, &pCtg);
|
||||||
|
ASSERT_EQ(code, 0);
|
||||||
|
|
||||||
|
SIndexInfo info;
|
||||||
|
code = catalogGetIndexMeta(pCtg, mockPointer, "index1", &info);
|
||||||
|
ASSERT_TRUE(code != 0);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(refreshGetMeta, normal2normal) {
|
TEST(refreshGetMeta, normal2normal) {
|
||||||
struct SCatalog *pCtg = NULL;
|
struct SCatalog *pCtg = NULL;
|
||||||
SRequestConnInfo *mockPointer = (SRequestConnInfo *)0x1;
|
SRequestConnInfo *mockPointer = (SRequestConnInfo *)0x1;
|
||||||
|
|
|
@ -202,6 +202,7 @@ char* jobTaskStatusStr(int32_t status) {
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
SSchema createSchema(int8_t type, int32_t bytes, col_id_t colId, const char* name) {
|
SSchema createSchema(int8_t type, int32_t bytes, col_id_t colId, const char* name) {
|
||||||
SSchema s = {0};
|
SSchema s = {0};
|
||||||
s.type = type;
|
s.type = type;
|
||||||
|
@ -211,6 +212,7 @@ SSchema createSchema(int8_t type, int32_t bytes, col_id_t colId, const char* nam
|
||||||
tstrncpy(s.name, name, tListLen(s.name));
|
tstrncpy(s.name, name, tListLen(s.name));
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void freeSTableMetaRspPointer(void *p) {
|
void freeSTableMetaRspPointer(void *p) {
|
||||||
tFreeSTableMetaRsp(*(void**)p);
|
tFreeSTableMetaRsp(*(void**)p);
|
||||||
|
|
|
@ -253,7 +253,7 @@ int32_t qwDbgEnableDebug(char *option) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == strcasecmp(option, "dead")) {
|
if (0 == strcasecmp(option, "dead")) {
|
||||||
gQWDebug.sleepSimulate = true;
|
gQWDebug.deadSimulate = true;
|
||||||
qError("qw dead debug enabled");
|
qError("qw dead debug enabled");
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,6 +146,7 @@ int32_t qwBuildAndSendFetchRsp(int32_t rspType, SRpcHandleInfo *pConn, SRetrieve
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
int32_t qwBuildAndSendCancelRsp(SRpcHandleInfo *pConn, int32_t code) {
|
int32_t qwBuildAndSendCancelRsp(SRpcHandleInfo *pConn, int32_t code) {
|
||||||
STaskCancelRsp *pRsp = (STaskCancelRsp *)rpcMallocCont(sizeof(STaskCancelRsp));
|
STaskCancelRsp *pRsp = (STaskCancelRsp *)rpcMallocCont(sizeof(STaskCancelRsp));
|
||||||
pRsp->code = code;
|
pRsp->code = code;
|
||||||
|
@ -177,6 +178,7 @@ int32_t qwBuildAndSendDropRsp(SRpcHandleInfo *pConn, int32_t code) {
|
||||||
tmsgSendRsp(&rpcRsp);
|
tmsgSendRsp(&rpcRsp);
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int32_t qwBuildAndSendDropMsg(QW_FPARAMS_DEF, SRpcHandleInfo *pConn) {
|
int32_t qwBuildAndSendDropMsg(QW_FPARAMS_DEF, SRpcHandleInfo *pConn) {
|
||||||
STaskDropReq *req = (STaskDropReq *)rpcMallocCont(sizeof(STaskDropReq));
|
STaskDropReq *req = (STaskDropReq *)rpcMallocCont(sizeof(STaskDropReq));
|
||||||
|
@ -490,6 +492,7 @@ int32_t qWorkerProcessRspMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int64
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
int32_t qWorkerProcessCancelMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int64_t ts) {
|
int32_t qWorkerProcessCancelMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int64_t ts) {
|
||||||
if (NULL == node || NULL == qWorkerMgmt || NULL == pMsg) {
|
if (NULL == node || NULL == qWorkerMgmt || NULL == pMsg) {
|
||||||
return TSDB_CODE_QRY_INVALID_INPUT;
|
return TSDB_CODE_QRY_INVALID_INPUT;
|
||||||
|
@ -530,6 +533,7 @@ _return:
|
||||||
|
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int32_t qWorkerProcessDropMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int64_t ts) {
|
int32_t qWorkerProcessDropMsg(void *node, void *qWorkerMgmt, SRpcMsg *pMsg, int64_t ts) {
|
||||||
if (NULL == node || NULL == qWorkerMgmt || NULL == pMsg) {
|
if (NULL == node || NULL == qWorkerMgmt || NULL == pMsg) {
|
||||||
|
|
|
@ -796,7 +796,7 @@ void *fetchQueueThread(void *param) {
|
||||||
qWorkerProcessFetchMsg(mockPointer, mgmt, fetchRpc, 0);
|
qWorkerProcessFetchMsg(mockPointer, mgmt, fetchRpc, 0);
|
||||||
break;
|
break;
|
||||||
case TDMT_SCH_CANCEL_TASK:
|
case TDMT_SCH_CANCEL_TASK:
|
||||||
qWorkerProcessCancelMsg(mockPointer, mgmt, fetchRpc, 0);
|
//qWorkerProcessCancelMsg(mockPointer, mgmt, fetchRpc, 0);
|
||||||
break;
|
break;
|
||||||
case TDMT_SCH_DROP_TASK:
|
case TDMT_SCH_DROP_TASK:
|
||||||
qWorkerProcessDropMsg(mockPointer, mgmt, fetchRpc, 0);
|
qWorkerProcessDropMsg(mockPointer, mgmt, fetchRpc, 0);
|
||||||
|
|
Loading…
Reference in New Issue