未验证 提交 4f86c27b 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #17688 from taosdata/feature/sync2-merge

refactor(sync): check pSyncTimer NULL
......@@ -38,7 +38,7 @@ extern bool gRaftDetailLog;
#define SYNC_DEL_WAL_MS (1000 * 60)
#define SYNC_ADD_QUORUM_COUNT 3
#define SYNC_MNODE_LOG_RETENTION 10000
#define SYNC_VNODE_LOG_RETENTION 500
#define SYNC_VNODE_LOG_RETENTION 100
#define SYNC_APPEND_ENTRIES_TIMEOUT_MS 10000
......
......@@ -234,9 +234,9 @@ typedef enum ELogicConditionType {
* - Secondly, if all cols are VarDataT type except primary key, we need 4 bits to store the offset, thus
* the final value is 65531-(4096-1)*4 = 49151.
*/
#define TSDB_MAX_BYTES_PER_ROW 49151
#define TSDB_MAX_TAGS_LEN 16384
#define TSDB_MAX_TAGS 128
#define TSDB_MAX_BYTES_PER_ROW 49151
#define TSDB_MAX_TAGS_LEN 16384
#define TSDB_MAX_TAGS 128
#define TSDB_MAX_COL_TAG_NUM (TSDB_MAX_COLUMNS + TSDB_MAX_TAGS)
#define TSDB_MAX_JSON_TAG_LEN 16384
......@@ -370,13 +370,13 @@ typedef enum ELogicConditionType {
#define TSDB_DB_MIN_WAL_RETENTION_PERIOD -1
#define TSDB_REP_DEF_DB_WAL_RET_PERIOD 0
#define TSDB_REPS_DEF_DB_WAL_RET_PERIOD (24 * 60 * 60 * 4)
#define TSDB_REPS_DEF_DB_WAL_RET_PERIOD 0
#define TSDB_DB_MIN_WAL_RETENTION_SIZE -1
#define TSDB_REP_DEF_DB_WAL_RET_SIZE 0
#define TSDB_REPS_DEF_DB_WAL_RET_SIZE -1
#define TSDB_REPS_DEF_DB_WAL_RET_SIZE 0
#define TSDB_DB_MIN_WAL_ROLL_PERIOD 0
#define TSDB_REP_DEF_DB_WAL_ROLL_PERIOD 0
#define TSDB_REPS_DEF_DB_WAL_ROLL_PERIOD (24 * 60 * 60 * 1)
#define TSDB_REPS_DEF_DB_WAL_ROLL_PERIOD 0
#define TSDB_DB_MIN_WAL_SEGMENT_SIZE 0
#define TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE 0
......@@ -409,7 +409,7 @@ typedef enum ELogicConditionType {
#define TSDB_MAX_RPC_THREADS 10
#endif
#define TSDB_QUERY_TYPE_NON_TYPE 0x00u // none type
#define TSDB_QUERY_TYPE_NON_TYPE 0x00u // none type
#define TSDB_META_COMPACT_RATIO 0 // disable tsdb meta compact by default
......@@ -486,7 +486,7 @@ enum {
#define MAX_NUM_STR_SIZE 40
#define MAX_META_MSG_IN_BATCH 1048576
#define MAX_META_MSG_IN_BATCH 1048576
#define MAX_META_BATCH_RSP_SIZE (1 * 1048576 * 1024)
#ifdef __cplusplus
......
......@@ -1645,7 +1645,9 @@ int32_t syncNodeStartHeartbeatTimer(SSyncNode* pSyncNode) {
for (int i = 0; i < pSyncNode->peersNum; ++i) {
SSyncTimer* pSyncTimer = syncNodeGetHbTimer(pSyncNode, &(pSyncNode->peersId[i]));
syncHbTimerStart(pSyncNode, pSyncTimer);
if (pSyncTimer != NULL) {
syncHbTimerStart(pSyncNode, pSyncTimer);
}
}
return ret;
......@@ -1662,7 +1664,9 @@ int32_t syncNodeStopHeartbeatTimer(SSyncNode* pSyncNode) {
for (int i = 0; i < pSyncNode->peersNum; ++i) {
SSyncTimer* pSyncTimer = syncNodeGetHbTimer(pSyncNode, &(pSyncNode->peersId[i]));
syncHbTimerStop(pSyncNode, pSyncTimer);
if (pSyncTimer != NULL) {
syncHbTimerStop(pSyncNode, pSyncTimer);
}
}
return ret;
......
......@@ -111,13 +111,13 @@ endi
if $data21_db != 1000 then # wal_level fsyncperiod
return -1
endi
if $data22_db != 345600 then # wal_retention_period
if $data22_db != 0 then # wal_retention_period
return -1
endi
if $data23_db != -1 then # wal_retention_size
if $data23_db != 0 then # wal_retention_size
return -1
endi
if $data24_db != 86400 then # wal_roll_period
if $data24_db != 0 then # wal_roll_period
return -1
endi
if $data25_db != 0 then # wal_segment_size
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册