fix(tsdb/cache-update): compare when rocks's colVal not null
This commit is contained in:
parent
bb227a9798
commit
3d1612e44b
|
@ -1090,7 +1090,11 @@ int32_t tsdbCacheUpdate(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, TSDBROW *pRow
|
||||||
SLastCol *PToFree = pLastCol;
|
SLastCol *PToFree = pLastCol;
|
||||||
|
|
||||||
if (IS_LAST_ROW_KEY(idxKey->key)) {
|
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))) {
|
if (NULL == pLastCol || cmp_res < 0 || (cmp_res == 0 && !COL_VAL_IS_NONE(pColVal))) {
|
||||||
char *value = NULL;
|
char *value = NULL;
|
||||||
size_t vlen = 0;
|
size_t vlen = 0;
|
||||||
|
|
Loading…
Reference in New Issue