Merge pull request #12976 from taosdata/feature/TD-13066-3.0

fix: use real schema version of row
This commit is contained in:
Cary Xu 2022-05-25 16:17:14 +08:00 committed by GitHub
commit 8916ed9370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -617,16 +617,18 @@ static int vnodeDebugPrintSingleSubmitMsg(SMeta *pMeta, SSubmitBlk *pBlock, SSub
STSchema *pSchema = NULL; STSchema *pSchema = NULL;
tb_uid_t suid = 0; tb_uid_t suid = 0;
STSRow *row = NULL; STSRow *row = NULL;
int32_t rv = -1;
tInitSubmitBlkIter(msgIter, pBlock, &blkIter); tInitSubmitBlkIter(msgIter, pBlock, &blkIter);
if (blkIter.row == NULL) return 0; if (blkIter.row == NULL) return 0;
if (!pSchema || (suid != msgIter->suid)) { if (!pSchema || (suid != msgIter->suid) || rv != TD_ROW_SVER(blkIter.row)) {
if (pSchema) { if (pSchema) {
taosMemoryFreeClear(pSchema); taosMemoryFreeClear(pSchema);
} }
pSchema = metaGetTbTSchema(pMeta, msgIter->suid, 1); // TODO: use the real schema pSchema = metaGetTbTSchema(pMeta, msgIter->suid, TD_ROW_SVER(blkIter.row)); // TODO: use the real schema
if (pSchema) { if (pSchema) {
suid = msgIter->suid; suid = msgIter->suid;
rv = TD_ROW_SVER(blkIter.row);
} }
} }
if (!pSchema) { if (!pSchema) {