Merge pull request #25687 from taosdata/fix/TD-29934-3.0

fix(tsdb/cache-update): compare when rocks's colVal not null
This commit is contained in:
Hongze Cheng 2024-05-08 21:48:01 +08:00 committed by GitHub
commit 9e21eacf26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -1093,7 +1093,11 @@ int32_t tsdbCacheUpdate(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, TSDBROW *pRow
SLastCol *PToFree = pLastCol;
if (IS_LAST_ROW_KEY(idxKey->key)) {
int32_t cmp_res = tRowKeyCompare(&pLastCol->rowKey, pRowKey);
int32_t cmp_res = 1;
if (pLastCol) {
cmp_res = tRowKeyCompare(&pLastCol->rowKey, pRowKey);
}
if (NULL == pLastCol || cmp_res < 0 || (cmp_res == 0 && !COL_VAL_IS_NONE(pColVal))) {
char *value = NULL;
size_t vlen = 0;