[TD-3228] <fix>: support quorum. fix buffer issue.

This commit is contained in:
Shuduo Sang 2021-03-10 23:55:45 +08:00
parent 5adfc1f4ab
commit baf10a4ad1
1 changed files with 3 additions and 3 deletions

View File

@ -2965,9 +2965,9 @@ static bool getMetaFromInsertJsonFile(cJSON* root) {
if (quorum && quorum->type == cJSON_Number) { if (quorum && quorum->type == cJSON_Number) {
g_Dbs.db[i].dbCfg.quorum = quorum->valueint; g_Dbs.db[i].dbCfg.quorum = quorum->valueint;
} else if (!quorum) { } else if (!quorum) {
g_Dbs.db[i].dbCfg.quorum = -1; g_Dbs.db[i].dbCfg.quorum = 1;
} else { } else {
printf("failed to read json, walLevel not found"); printf("failed to read json, quorum input mistake");
goto PARSE_OVER; goto PARSE_OVER;
} }