lru/applyF: fix ret value
This commit is contained in:
parent
2cb6c7af16
commit
968e3cf1ea
|
@ -235,6 +235,7 @@ static void rocksMayWrite(STsdb *pTsdb, bool force, bool read, bool lock) {
|
|||
tsdbError("vgId:%d, %s failed at line %d, count: %d since %s", TD_VID(pTsdb->pVnode), __func__, __LINE__, count,
|
||||
err);
|
||||
rocksdb_free(err);
|
||||
// pTsdb->flushState.flush_count = 0;
|
||||
}
|
||||
|
||||
rocksdb_writebatch_clear(wb);
|
||||
|
@ -485,7 +486,9 @@ int32_t tsdbCacheUpdate(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, TSDBROW *pRow
|
|||
}
|
||||
}
|
||||
|
||||
pLastCol->dirty = 1;
|
||||
if (!pLastCol->dirty) {
|
||||
pLastCol->dirty = 1;
|
||||
}
|
||||
/*
|
||||
char *value = NULL;
|
||||
size_t vlen = 0;
|
||||
|
@ -530,7 +533,9 @@ int32_t tsdbCacheUpdate(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, TSDBROW *pRow
|
|||
}
|
||||
}
|
||||
|
||||
pLastCol->dirty = 1;
|
||||
if (!pLastCol->dirty) {
|
||||
pLastCol->dirty = 1;
|
||||
}
|
||||
/*
|
||||
char *value = NULL;
|
||||
size_t vlen = 0;
|
||||
|
|
|
@ -156,7 +156,7 @@ static int taosLRUEntryTableApplyF(SLRUEntryTable *table, _taos_lru_functor_t fu
|
|||
SLRUEntry *n = h->nextHash;
|
||||
ASSERT(TAOS_LRU_ENTRY_IN_CACHE(h));
|
||||
ret = functor(h->keyData, h->keyLength, h->value, ud);
|
||||
if (!ret) {
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
h = n;
|
||||
|
@ -758,7 +758,7 @@ void taosLRUCacheErase(SLRUCache *cache, const void *key, size_t keyLen) {
|
|||
void taosLRUCacheApply(SLRUCache *cache, _taos_lru_functor_t functor, void *ud) {
|
||||
int numShards = cache->numShards;
|
||||
for (int i = 0; i < numShards; ++i) {
|
||||
if (0 != taosLRUCacheShardApply(&cache->shards[i], functor, ud)) {
|
||||
if (taosLRUCacheShardApply(&cache->shards[i], functor, ud)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue