未验证 提交 d30cc730 编写于 作者: D dapan1121 提交者: GitHub

Merge pull request #17064 from taosdata/fix/TS-1857

fix:[TS-1857]add log for invalid table id
......@@ -2567,6 +2567,8 @@ int32_t tscGetTableMeta(SSqlObj *pSql, STableMetaInfo *pTableMetaInfo) {
assert(size < 80*1024);
STableMeta* pMeta = pTableMetaInfo->pTableMeta;
tscDebug("0x%"PRIx64" tablemeta tscGetTableMeta uid:%" PRId64, pSql->self, pMeta->id.uid);
if (pMeta->id.uid > 0) {
// in case of child table, here only get the
if (pMeta->tableType == TSDB_CHILD_TABLE) {
......@@ -2574,6 +2576,7 @@ int32_t tscGetTableMeta(SSqlObj *pSql, STableMetaInfo *pTableMetaInfo) {
if (code != TSDB_CODE_SUCCESS) {
return getTableMetaFromMnode(pSql, pTableMetaInfo);
}
tscDebug("0x%"PRIx64" tablemeta tscGetTableMeta from local success uid:%" PRId64, pSql->self, pMeta->id.uid);
}
return TSDB_CODE_SUCCESS;
......
......@@ -3042,6 +3042,7 @@ static bool needRetryInsert(SSqlObj* pParentObj, int32_t numOfSub) {
for (int32_t i = 0; i < numOfSub; ++i) {
int32_t code = pParentObj->pSubs[i]->res.code;
tscDebug("0x%"PRIx64" needRetryInsert, code:%d", pParentObj->self, code);
if (code == TSDB_CODE_SUCCESS) {
continue;
}
......@@ -3135,6 +3136,7 @@ static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows)
for(int32_t i = 0; i < pParentObj->cmd.numOfTables; ++i) {
char name[TSDB_TABLE_FNAME_LEN] = {0};
tNameExtractFullName(pParentObj->cmd.pTableNameList[i], name);
tscDebug("0x%"PRIx64" cleanup %s tableMeta in hashTable", pParentObj->self, name);
taosHashRemove(tscTableMetaInfo, name, strnlen(name, TSDB_TABLE_FNAME_LEN));
}
......
......@@ -619,8 +619,8 @@ static int tsdbScanAndConvertSubmitMsg(STsdbRepo *pRepo, SSubmitMsg *pMsg) {
pBlock->numOfRows = htons(pBlock->numOfRows);
if (pBlock->tid <= 0 || pBlock->tid >= pMeta->maxTables) {
tsdbError("vgId:%d failed to get table to insert data, uid %" PRIu64 " tid %d", REPO_ID(pRepo), pBlock->uid,
pBlock->tid);
tsdbError("vgId:%d failed to get table to insert data, uid %" PRIu64 " tid %d, maxTable: %d", REPO_ID(pRepo), pBlock->uid,
pBlock->tid, pMeta->maxTables);
terrno = TSDB_CODE_TDB_INVALID_TABLE_ID;
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册