Fix ci file check error.
This commit is contained in:
parent
5d2bc35569
commit
1451cfb076
|
@ -2808,7 +2808,7 @@ int32_t localConfigSerialize(SArray *array, char **serialized) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cJSON_AddItemToObject(json, "configs", cField);
|
if (!cJSON_AddItemToObject(json, "configs", cField)) goto _exit;
|
||||||
*serialized = cJSON_Print(json);
|
*serialized = cJSON_Print(json);
|
||||||
_exit:
|
_exit:
|
||||||
if (terrno != TSDB_CODE_SUCCESS) {
|
if (terrno != TSDB_CODE_SUCCESS) {
|
||||||
|
@ -2890,7 +2890,7 @@ int32_t tSerializeSConfigArray(SEncoder *pEncoder, SArray *array) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
int32_t lino = 0;
|
int32_t lino = 0;
|
||||||
int32_t sz = taosArrayGetSize(array);
|
int32_t sz = taosArrayGetSize(array);
|
||||||
tEncodeI32(pEncoder, sz);
|
TAOS_CHECK_EXIT(tEncodeI32(pEncoder, sz));
|
||||||
for (int i = 0; i < sz; i++) {
|
for (int i = 0; i < sz; i++) {
|
||||||
SConfigItem *item = (SConfigItem *)taosArrayGet(array, i);
|
SConfigItem *item = (SConfigItem *)taosArrayGet(array, i);
|
||||||
TAOS_CHECK_EXIT(tEncodeCStr(pEncoder, item->name));
|
TAOS_CHECK_EXIT(tEncodeCStr(pEncoder, item->name));
|
||||||
|
@ -2930,7 +2930,7 @@ int32_t tDeserializeSConfigArray(SDecoder *pDecoder, SArray *array) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
int32_t lino = 0;
|
int32_t lino = 0;
|
||||||
int32_t sz = 0;
|
int32_t sz = 0;
|
||||||
tDecodeI32(pDecoder, &sz);
|
TAOS_CHECK_EXIT(tDecodeI32(pDecoder, &sz));
|
||||||
for (int i = 0; i < sz; i++) {
|
for (int i = 0; i < sz; i++) {
|
||||||
SConfigItem item = {0};
|
SConfigItem item = {0};
|
||||||
TAOS_CHECK_EXIT(tDecodeCStr(pDecoder, &item.name));
|
TAOS_CHECK_EXIT(tDecodeCStr(pDecoder, &item.name));
|
||||||
|
@ -2961,9 +2961,15 @@ int32_t tDeserializeSConfigArray(SDecoder *pDecoder, SArray *array) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
taosArrayPush(array, &item);
|
if (taosArrayPush(array, &item) == NULL) {
|
||||||
|
code = terrno;
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_exit:
|
_exit:
|
||||||
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
uError("failed to deserialize SConfigItem at line:%d, since %s", lino, tstrerror(code));
|
||||||
|
}
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3008,7 +3014,10 @@ int32_t compareSConfigItemArrays(SArray *mArray, const SArray *dArray, SArray *d
|
||||||
SConfigItem *dItem = (SConfigItem *)taosArrayGet(dArray, i);
|
SConfigItem *dItem = (SConfigItem *)taosArrayGet(dArray, i);
|
||||||
if (!compareSConfigItem(mItem, dItem)) {
|
if (!compareSConfigItem(mItem, dItem)) {
|
||||||
code = TSDB_CODE_FAILED;
|
code = TSDB_CODE_FAILED;
|
||||||
taosArrayPush(diffArray, mItem);
|
if (taosArrayPush(diffArray, mItem) == NULL) {
|
||||||
|
code = terrno;
|
||||||
|
return code;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -330,7 +330,11 @@ static void dmProcessConfigRsp(SDnodeMgmt *pMgmt, SRpcMsg *pRsp) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (needUpdate) {
|
if (needUpdate) {
|
||||||
setAllConfigs(tsCfg);
|
code = setAllConfigs(tsCfg);
|
||||||
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
dError("failed to set all configs since %s", tstrerror(code));
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
code = taosPersistLocalConfig(pMgmt->path);
|
code = taosPersistLocalConfig(pMgmt->path);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
|
|
@ -215,7 +215,11 @@ static int32_t mndProcessConfigReq(SRpcMsg *pReq) {
|
||||||
SDnodeObj *pDnode = NULL;
|
SDnodeObj *pDnode = NULL;
|
||||||
int32_t code = -1;
|
int32_t code = -1;
|
||||||
|
|
||||||
tDeserializeSConfigReq(pReq->pCont, pReq->contLen, &configReq);
|
code = tDeserializeSConfigReq(pReq->pCont, pReq->contLen, &configReq);
|
||||||
|
if (code != 0) {
|
||||||
|
mError("failed to deserialize config req, since %s", terrstr());
|
||||||
|
goto _OVER;
|
||||||
|
}
|
||||||
SArray *diffArray = taosArrayInit(16, sizeof(SConfigItem));
|
SArray *diffArray = taosArrayInit(16, sizeof(SConfigItem));
|
||||||
SConfigRsp configRsp = {0};
|
SConfigRsp configRsp = {0};
|
||||||
configRsp.forceReadConfig = configReq.forceReadConfig;
|
configRsp.forceReadConfig = configReq.forceReadConfig;
|
||||||
|
@ -315,7 +319,10 @@ int32_t mndInitReadCfg(SMnode *pMnode) {
|
||||||
mInfo("failed to acquire mnd config:%s, since %s", item->name, terrstr());
|
mInfo("failed to acquire mnd config:%s, since %s", item->name, terrstr());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
cfgUpdateItem(item, newObj);
|
code = cfgUpdateItem(item, newObj);
|
||||||
|
if (code != 0) {
|
||||||
|
mError("failed to update mnd config:%s, since %s", item->name, terrstr());
|
||||||
|
}
|
||||||
sdbRelease(pMnode->pSdb, newObj);
|
sdbRelease(pMnode->pSdb, newObj);
|
||||||
}
|
}
|
||||||
_OVER:
|
_OVER:
|
||||||
|
|
Loading…
Reference in New Issue