From b10bc2ed5ba68aaf6d4bd2dc1027207463e4eec9 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Fri, 23 Sep 2022 19:17:39 +0800 Subject: [PATCH] fix: avoid assertion on changing num of spaces in JSON files raft_config.json and raft_store.json --- source/libs/sync/src/syncRaftStore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/sync/src/syncRaftStore.c b/source/libs/sync/src/syncRaftStore.c index 9085873036..29f78b582f 100644 --- a/source/libs/sync/src/syncRaftStore.c +++ b/source/libs/sync/src/syncRaftStore.c @@ -46,7 +46,7 @@ SRaftStore *raftStoreOpen(const char *path) { ASSERT(pRaftStore->pFile != NULL); int len = taosReadFile(pRaftStore->pFile, storeBuf, RAFT_STORE_BLOCK_SIZE); - ASSERT(len == RAFT_STORE_BLOCK_SIZE); + ASSERT(len > 0); ret = raftStoreDeserialize(pRaftStore, storeBuf, len); ASSERT(ret == 0);