Fix review errors.
This commit is contained in:
parent
43fffd644b
commit
d071f40328
|
@ -364,7 +364,7 @@ typedef enum ELogicConditionType {
|
|||
#define TSDB_MAX_REPLICA 5
|
||||
#define TSDB_MAX_LEARNER_REPLICA 10
|
||||
#define TSDB_SYNC_RESTORE_lEN 20
|
||||
#define TSDB_SYNC_APPLY_COMMIT_LEN 27
|
||||
#define TSDB_SYNC_APPLY_COMMIT_LEN 41
|
||||
#define TSDB_SYNC_LOG_BUFFER_SIZE 4096
|
||||
#define TSDB_SYNC_LOG_BUFFER_RETENTION 256
|
||||
#define TSDB_SYNC_LOG_BUFFER_THRESHOLD (1024 * 1024 * 5)
|
||||
|
|
|
@ -1432,8 +1432,6 @@ int32_t tSerializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) {
|
|||
TAOS_CHECK_EXIT(tEncodeI32(&encoder, pload->learnerProgress));
|
||||
TAOS_CHECK_EXIT(tEncodeI64(&encoder, pload->roleTimeMs));
|
||||
TAOS_CHECK_EXIT(tEncodeI64(&encoder, pload->startTimeMs));
|
||||
TAOS_CHECK_EXIT(tEncodeI64(&encoder, pload->syncAppliedIndex));
|
||||
TAOS_CHECK_EXIT(tEncodeI64(&encoder, pload->syncCommitIndex));
|
||||
}
|
||||
|
||||
// mnode loads
|
||||
|
|
|
@ -1125,8 +1125,8 @@ static int32_t mndRetrieveVgroups(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *p
|
|||
return code;
|
||||
}
|
||||
|
||||
char applyStr[TSDB_SYNC_APPLY_COMMIT_LEN] = {0};
|
||||
char buf[TSDB_SYNC_APPLY_COMMIT_LEN] = {0};
|
||||
char applyStr[TSDB_SYNC_APPLY_COMMIT_LEN + 1] = {0};
|
||||
char buf[TSDB_SYNC_APPLY_COMMIT_LEN + VARSTR_HEADER_SIZE + 1] = {0};
|
||||
snprintf(applyStr, sizeof(applyStr), "%" PRId64 "/%" PRId64, pVgroup->vnodeGid[i].syncAppliedIndex,
|
||||
pVgroup->vnodeGid[i].syncCommitIndex);
|
||||
STR_WITH_MAXSIZE_TO_VARSTR(buf, applyStr, pShow->pMeta->pSchemas[cols].bytes);
|
||||
|
@ -1358,7 +1358,7 @@ static int32_t mndRetrieveVnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
|||
calculateRstoreFinishTime(pGid->appliedRate, unappliedCount, restoreStr, sizeof(restoreStr));
|
||||
}
|
||||
STR_TO_VARSTR(buf, restoreStr);
|
||||
colDataSetVal(pColInfo, numOfRows, (const char *)&buf, false);
|
||||
code = colDataSetVal(pColInfo, numOfRows, (const char *)&buf, false);
|
||||
if (code != 0) {
|
||||
mError("vgId:%d, failed to set syncRestore finish time, since %s", pVgroup->vgId, tstrerror(code));
|
||||
return code;
|
||||
|
|
Loading…
Reference in New Issue