enh: insert optimize
This commit is contained in:
parent
9ae008235c
commit
91da143ae5
|
@ -556,12 +556,8 @@ static int32_t parseTagValue(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt
|
||||||
}
|
}
|
||||||
|
|
||||||
static void buildCreateTbReq(SVnodeModifOpStmt* pStmt, STag* pTag, SArray* pTagName) {
|
static void buildCreateTbReq(SVnodeModifOpStmt* pStmt, STag* pTag, SArray* pTagName) {
|
||||||
char tbFName[TSDB_TABLE_FNAME_LEN];
|
insBuildCreateTbReq(&pStmt->createTblReq, pStmt->targetTableName.tname, pTag, pStmt->pTableMeta->suid,
|
||||||
tNameExtractFullName(&pStmt->targetTableName, tbFName);
|
pStmt->usingTableName.tname, pTagName, pStmt->pTableMeta->tableInfo.numOfTags);
|
||||||
char stbFName[TSDB_TABLE_FNAME_LEN];
|
|
||||||
tNameExtractFullName(&pStmt->usingTableName, stbFName);
|
|
||||||
insBuildCreateTbReq(&pStmt->createTblReq, tbFName, pTag, pStmt->pTableMeta->suid, stbFName, pTagName,
|
|
||||||
pStmt->pTableMeta->tableInfo.numOfTags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMsgBuf) {
|
static int32_t checkAndTrimValue(SToken* pToken, char* tmpTokenBuf, SMsgBuf* pMsgBuf) {
|
||||||
|
@ -671,6 +667,7 @@ static int32_t parseTagsClause(SInsertParseContext* pCxt, SVnodeModifOpStmt* pSt
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t storeTableMeta(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) {
|
static int32_t storeTableMeta(SInsertParseContext* pCxt, SVnodeModifOpStmt* pStmt) {
|
||||||
|
pStmt->pTableMeta->suid = pStmt->pTableMeta->uid;
|
||||||
pStmt->pTableMeta->uid = pStmt->totalTbNum;
|
pStmt->pTableMeta->uid = pStmt->totalTbNum;
|
||||||
pStmt->pTableMeta->tableType = TSDB_CHILD_TABLE;
|
pStmt->pTableMeta->tableType = TSDB_CHILD_TABLE;
|
||||||
|
|
||||||
|
|
|
@ -1134,7 +1134,7 @@ int32_t schBuildAndSendMsg(SSchJob *pJob, SSchTask *pTask, SQueryNodeAddr *addr,
|
||||||
SCH_ERR_RET(TSDB_CODE_SCH_INTERNAL_ERROR);
|
SCH_ERR_RET(TSDB_CODE_SCH_INTERNAL_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
SSchTrans trans = {.pTrans = pJob->conn.pTrans, .pHandle = SCH_GET_TASK_HANDLE(pTask)};
|
SSchTrans trans = {.pTrans = pJob->conn.pTrans, .pHandle = SCH_GET_TASK_HANDLE(pTask)};
|
||||||
code = schAsyncSendMsg(pJob, pTask, &trans, addr, msgType, msg, (uint32_t)msgSize, persistHandle, (rpcCtx.args ? &rpcCtx : NULL));
|
code = schAsyncSendMsg(pJob, pTask, &trans, addr, msgType, msg, (uint32_t)msgSize, persistHandle, (rpcCtx.args ? &rpcCtx : NULL));
|
||||||
msg = NULL;
|
msg = NULL;
|
||||||
|
|
Loading…
Reference in New Issue