fix: the default value of wal-related database parameters is incorrect
This commit is contained in:
parent
90aa644e4d
commit
04a2e8e541
|
@ -819,6 +819,10 @@ SNode* createDefaultDatabaseOptions(SAstCreateContext* pCxt) {
|
|||
pOptions->numOfVgroups = TSDB_DEFAULT_VN_PER_DB;
|
||||
pOptions->singleStable = TSDB_DEFAULT_DB_SINGLE_STABLE;
|
||||
pOptions->schemaless = TSDB_DEFAULT_DB_SCHEMALESS;
|
||||
pOptions->walRetentionPeriod = TSDB_DEFAULT_DB_WAL_RETENTION_PERIOD;
|
||||
pOptions->walRetentionSize = TSDB_DEFAULT_DB_WAL_RETENTION_SIZE;
|
||||
pOptions->walRollPeriod = TSDB_DEFAULT_DB_WAL_ROLL_PERIOD;
|
||||
pOptions->walSegmentSize = TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE;
|
||||
return (SNode*)pOptions;
|
||||
}
|
||||
|
||||
|
@ -846,6 +850,10 @@ SNode* createAlterDatabaseOptions(SAstCreateContext* pCxt) {
|
|||
pOptions->numOfVgroups = -1;
|
||||
pOptions->singleStable = -1;
|
||||
pOptions->schemaless = -1;
|
||||
pOptions->walRetentionPeriod = -1;
|
||||
pOptions->walRetentionSize = -1;
|
||||
pOptions->walRollPeriod = -1;
|
||||
pOptions->walSegmentSize = -1;
|
||||
return (SNode*)pOptions;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,16 +111,16 @@ endi
|
|||
if $data21_db != 1000 then # wal_level fsyncperiod
|
||||
return -1
|
||||
endi
|
||||
if $data22_db != 0 then #
|
||||
if $data22_db != 172800 then # wal_retention_period
|
||||
return -1
|
||||
endi
|
||||
if $data23_db != 0 then #
|
||||
if $data23_db != -1 then # wal_retention_size
|
||||
return -1
|
||||
endi
|
||||
if $data24_db != 0 then #
|
||||
if $data24_db != 86400 then # wal_roll_period
|
||||
return -1
|
||||
endi
|
||||
if $data25_db != 0 then #
|
||||
if $data25_db != 0 then # wal_segment_size
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
Loading…
Reference in New Issue