From 2ff8f1146340c1b3489e2a778bff985e86685642 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Wed, 23 Dec 2020 14:49:35 +0800 Subject: [PATCH] fix: default cacheLastRow to 0 if not config in vnode cfg --- src/vnode/src/vnodeCfg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vnode/src/vnodeCfg.c b/src/vnode/src/vnodeCfg.c index dbc40cbad6..f46a8e09a5 100644 --- a/src/vnode/src/vnodeCfg.c +++ b/src/vnode/src/vnodeCfg.c @@ -211,9 +211,11 @@ int32_t vnodeReadCfg(SVnodeObj *pVnode) { cJSON *cacheLastRow = cJSON_GetObjectItem(root, "cacheLastRow"); if (!cacheLastRow || cacheLastRow->type != cJSON_Number) { vError("vgId: %d, failed to read %s, cacheLastRow not found", pVnode->vgId, file); - goto PARSE_VCFG_ERROR; + //goto PARSE_VCFG_ERROR; + vnodeMsg.cfg.cacheLastRow = 0; + } else { + vnodeMsg.cfg.cacheLastRow = (int8_t)cacheLastRow->valueint; } - vnodeMsg.cfg.cacheLastRow = (int8_t)cacheLastRow->valueint; cJSON *nodeInfos = cJSON_GetObjectItem(root, "nodeInfos"); if (!nodeInfos || nodeInfos->type != cJSON_Array) { -- GitLab