未验证 提交 7747cd82 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2465 from taosdata/feature/2.0tsdb

fix kv store init coredump
...@@ -500,7 +500,7 @@ static int tdRestoreKVStore(SKVStore *pStore) { ...@@ -500,7 +500,7 @@ static int tdRestoreKVStore(SKVStore *pStore) {
char *pBuf = tdDecodeKVRecord(tbuf, &rInfo); char *pBuf = tdDecodeKVRecord(tbuf, &rInfo);
ASSERT(POINTER_DISTANCE(pBuf, tbuf) == sizeof(SKVRecord)); ASSERT(POINTER_DISTANCE(pBuf, tbuf) == sizeof(SKVRecord));
ASSERT(pStore->info.size == rInfo.offset); ASSERT((rInfo.offset > 0) ? (pStore->info.size == rInfo.offset) : true);
if (rInfo.offset < 0) { if (rInfo.offset < 0) {
taosHashRemove(pStore->map, (void *)(&rInfo.uid), sizeof(rInfo.uid)); taosHashRemove(pStore->map, (void *)(&rInfo.uid), sizeof(rInfo.uid));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册