cache/memtable: update cache when flag is on
This commit is contained in:
parent
5778fa676f
commit
765cc72618
|
@ -314,7 +314,7 @@ static void tsdbCacheDeleter(const void *key, size_t keyLen, void *value) {
|
||||||
if (pLastCol->dirty) {
|
if (pLastCol->dirty) {
|
||||||
// TODO: queue into dirty list, free it after save to backstore
|
// TODO: queue into dirty list, free it after save to backstore
|
||||||
} else {
|
} else {
|
||||||
if (IS_VAR_DATA_TYPE(pLastCol->colVal.type) && pLastCol->colVal.value.nData > 0) {
|
if (IS_VAR_DATA_TYPE(pLastCol->colVal.type) /* && pLastCol->colVal.value.nData > 0*/) {
|
||||||
taosMemoryFree(pLastCol->colVal.value.pData);
|
taosMemoryFree(pLastCol->colVal.value.pData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -737,7 +737,9 @@ static int32_t tsdbInsertRowDataToTable(SMemTable *pMemTable, STbData *pTbData,
|
||||||
if (key.ts >= pTbData->maxKey) {
|
if (key.ts >= pTbData->maxKey) {
|
||||||
pTbData->maxKey = key.ts;
|
pTbData->maxKey = key.ts;
|
||||||
}
|
}
|
||||||
|
if (!TSDB_CACHE_NO(pMemTable->pTsdb->pVnode->config)) {
|
||||||
tsdbCacheUpdate(pMemTable->pTsdb, pTbData->suid, pTbData->uid, &lRow);
|
tsdbCacheUpdate(pMemTable->pTsdb, pTbData->suid, pTbData->uid, &lRow);
|
||||||
|
}
|
||||||
|
|
||||||
// SMemTable
|
// SMemTable
|
||||||
pMemTable->minKey = TMIN(pMemTable->minKey, pTbData->minKey);
|
pMemTable->minKey = TMIN(pMemTable->minKey, pTbData->minKey);
|
||||||
|
|
Loading…
Reference in New Issue