提交 968e3cf1 编写于 作者: M Minglei Jin

lru/applyF: fix ret value

上级 2cb6c7af
...@@ -235,6 +235,7 @@ static void rocksMayWrite(STsdb *pTsdb, bool force, bool read, bool lock) { ...@@ -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, tsdbError("vgId:%d, %s failed at line %d, count: %d since %s", TD_VID(pTsdb->pVnode), __func__, __LINE__, count,
err); err);
rocksdb_free(err); rocksdb_free(err);
// pTsdb->flushState.flush_count = 0;
} }
rocksdb_writebatch_clear(wb); rocksdb_writebatch_clear(wb);
...@@ -485,7 +486,9 @@ int32_t tsdbCacheUpdate(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, TSDBROW *pRow ...@@ -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; char *value = NULL;
size_t vlen = 0; size_t vlen = 0;
...@@ -530,7 +533,9 @@ int32_t tsdbCacheUpdate(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, TSDBROW *pRow ...@@ -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; char *value = NULL;
size_t vlen = 0; size_t vlen = 0;
......
...@@ -156,7 +156,7 @@ static int taosLRUEntryTableApplyF(SLRUEntryTable *table, _taos_lru_functor_t fu ...@@ -156,7 +156,7 @@ static int taosLRUEntryTableApplyF(SLRUEntryTable *table, _taos_lru_functor_t fu
SLRUEntry *n = h->nextHash; SLRUEntry *n = h->nextHash;
ASSERT(TAOS_LRU_ENTRY_IN_CACHE(h)); ASSERT(TAOS_LRU_ENTRY_IN_CACHE(h));
ret = functor(h->keyData, h->keyLength, h->value, ud); ret = functor(h->keyData, h->keyLength, h->value, ud);
if (!ret) { if (ret) {
return ret; return ret;
} }
h = n; h = n;
...@@ -758,7 +758,7 @@ void taosLRUCacheErase(SLRUCache *cache, const void *key, size_t keyLen) { ...@@ -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) { void taosLRUCacheApply(SLRUCache *cache, _taos_lru_functor_t functor, void *ud) {
int numShards = cache->numShards; int numShards = cache->numShards;
for (int i = 0; i < numShards; ++i) { for (int i = 0; i < numShards; ++i) {
if (0 != taosLRUCacheShardApply(&cache->shards[i], functor, ud)) { if (taosLRUCacheShardApply(&cache->shards[i], functor, ud)) {
break; break;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册