need to restore magic number when kvstore open
This commit is contained in:
parent
e41a6f4bca
commit
5e8b11415a
|
@ -141,6 +141,7 @@ SKVStore *tdOpenKVStore(char *fname, iterFunc iFunc, afterFunc aFunc, void *appH
|
||||||
if (tdLoadKVStoreHeader(pStore->fd, pStore->fname, &info) < 0) goto _err;
|
if (tdLoadKVStoreHeader(pStore->fd, pStore->fname, &info) < 0) goto _err;
|
||||||
|
|
||||||
pStore->info.size = TD_KVSTORE_HEADER_SIZE;
|
pStore->info.size = TD_KVSTORE_HEADER_SIZE;
|
||||||
|
pStore->info.magic = info.magic;
|
||||||
|
|
||||||
if (tdRestoreKVStore(pStore) < 0) goto _err;
|
if (tdRestoreKVStore(pStore) < 0) goto _err;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue