tsdbCache: fix row duplication
This commit is contained in:
parent
40d34bf894
commit
9aa5ee6ccf
|
@ -139,7 +139,11 @@ int32_t tsdbCacheInsertLastrow(SLRUCache *pCache, STsdb *pTsdb, tb_uid_t uid, ST
|
||||||
} else {
|
} else {
|
||||||
taosLRUCacheRelease(pCache, h, true);
|
taosLRUCacheRelease(pCache, h, true);
|
||||||
// tsdbCacheDeleteLastrow(pCache, uid, TSKEY_MAX);
|
// tsdbCacheDeleteLastrow(pCache, uid, TSKEY_MAX);
|
||||||
|
if (dup) {
|
||||||
|
cacheRow = tdRowDup(row);
|
||||||
|
} else {
|
||||||
|
cacheRow = row;
|
||||||
|
}
|
||||||
_taos_lru_deleter_t deleter = deleteTableCacheLastrow;
|
_taos_lru_deleter_t deleter = deleteTableCacheLastrow;
|
||||||
LRUStatus status = taosLRUCacheInsert(pCache, key, keyLen, cacheRow, TD_ROW_LEN(cacheRow), deleter, NULL,
|
LRUStatus status = taosLRUCacheInsert(pCache, key, keyLen, cacheRow, TD_ROW_LEN(cacheRow), deleter, NULL,
|
||||||
TAOS_LRU_PRIORITY_LOW);
|
TAOS_LRU_PRIORITY_LOW);
|
||||||
|
|
Loading…
Reference in New Issue