Merge pull request #20872 from taosdata/fix/TD-23474

fix(tsdb/cache): skip schema updating for non ts row
This commit is contained in:
Xiaoyu Wang 2023-04-12 10:47:02 +08:00 committed by GitHub
commit 813591f993
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 8 deletions

View File

@ -1468,11 +1468,14 @@ static int32_t mergeLastRow(tb_uid_t uid, STsdb *pTsdb, bool *dup, SArray **ppCo
hasRow = true; hasRow = true;
code = updateTSchema(TSDBROW_SVERSION(pRow), pr, uid); int32_t sversion = TSDBROW_SVERSION(pRow);
if (TSDB_CODE_SUCCESS != code) { if (sversion != -1) {
goto _err; code = updateTSchema(sversion, pr, uid);
if (TSDB_CODE_SUCCESS != code) {
goto _err;
}
pTSchema = pr->pCurrSchema;
} }
pTSchema = pr->pCurrSchema;
int16_t nCol = pTSchema->numOfCols; int16_t nCol = pTSchema->numOfCols;
TSKEY rowTs = TSDBROW_TS(pRow); TSKEY rowTs = TSDBROW_TS(pRow);
@ -1622,11 +1625,14 @@ static int32_t mergeLast(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCach
hasRow = true; hasRow = true;
code = updateTSchema(TSDBROW_SVERSION(pRow), pr, uid); int32_t sversion = TSDBROW_SVERSION(pRow);
if (TSDB_CODE_SUCCESS != code) { if (sversion != -1) {
goto _err; code = updateTSchema(sversion, pr, uid);
if (TSDB_CODE_SUCCESS != code) {
goto _err;
}
pTSchema = pr->pCurrSchema;
} }
pTSchema = pr->pCurrSchema;
int16_t nCol = pTSchema->numOfCols; int16_t nCol = pTSchema->numOfCols;
TSKEY rowTs = TSDBROW_TS(pRow); TSKEY rowTs = TSDBROW_TS(pRow);