Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c49bb453
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c49bb453
编写于
9月 01, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
9月 01, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16575 from taosdata/enh/3.0_planner_optimize
enh: the default values of wal related parameters are different in si…
上级
752104bf
c06503d8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
72 addition
and
41 deletion
+72
-41
include/libs/nodes/cmdnodes.h
include/libs/nodes/cmdnodes.h
+3
-0
include/util/tdef.h
include/util/tdef.h
+12
-9
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+3
-3
source/libs/parser/src/parAstCreater.c
source/libs/parser/src/parAstCreater.c
+43
-26
source/libs/parser/test/parInitialCTest.cpp
source/libs/parser/test/parInitialCTest.cpp
+11
-3
未找到文件。
include/libs/nodes/cmdnodes.h
浏览文件 @
c49bb453
...
@@ -78,6 +78,9 @@ typedef struct SDatabaseOptions {
...
@@ -78,6 +78,9 @@ typedef struct SDatabaseOptions {
int32_t
walRetentionSize
;
int32_t
walRetentionSize
;
int32_t
walRollPeriod
;
int32_t
walRollPeriod
;
int32_t
walSegmentSize
;
int32_t
walSegmentSize
;
bool
walRetentionPeriodIsSet
;
bool
walRetentionSizeIsSet
;
bool
walRollPeriodIsSet
;
}
SDatabaseOptions
;
}
SDatabaseOptions
;
typedef
struct
SCreateDatabaseStmt
{
typedef
struct
SCreateDatabaseStmt
{
...
...
include/util/tdef.h
浏览文件 @
c49bb453
...
@@ -360,14 +360,17 @@ typedef enum ELogicConditionType {
...
@@ -360,14 +360,17 @@ typedef enum ELogicConditionType {
#define TSDB_DB_SCHEMALESS_OFF 0
#define TSDB_DB_SCHEMALESS_OFF 0
#define TSDB_DEFAULT_DB_SCHEMALESS TSDB_DB_SCHEMALESS_OFF
#define TSDB_DEFAULT_DB_SCHEMALESS TSDB_DB_SCHEMALESS_OFF
#define TSDB_DB_MIN_WAL_RETENTION_PERIOD -1
#define TSDB_DB_MIN_WAL_RETENTION_PERIOD -1
#define TSDB_DEFAULT_DB_WAL_RETENTION_PERIOD (24 * 60 * 60 * 4)
#define TSDB_REP_DEF_DB_WAL_RET_PERIOD 0
#define TSDB_DB_MIN_WAL_RETENTION_SIZE -1
#define TSDB_REPS_DEF_DB_WAL_RET_PERIOD (24 * 60 * 60 * 4)
#define TSDB_DEFAULT_DB_WAL_RETENTION_SIZE -1
#define TSDB_DB_MIN_WAL_RETENTION_SIZE -1
#define TSDB_DB_MIN_WAL_ROLL_PERIOD 0
#define TSDB_REP_DEF_DB_WAL_RET_SIZE 0
#define TSDB_DEFAULT_DB_WAL_ROLL_PERIOD (24 * 60 * 60 * 1)
#define TSDB_REPS_DEF_DB_WAL_RET_SIZE -1
#define TSDB_DB_MIN_WAL_SEGMENT_SIZE 0
#define TSDB_DB_MIN_WAL_ROLL_PERIOD 0
#define TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE 0
#define TSDB_REP_DEF_DB_WAL_ROLL_PERIOD 0
#define TSDB_REPS_DEF_DB_WAL_ROLL_PERIOD (24 * 60 * 60 * 1)
#define TSDB_DB_MIN_WAL_SEGMENT_SIZE 0
#define TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE 0
#define TSDB_MIN_ROLLUP_MAX_DELAY 1 // unit millisecond
#define TSDB_MIN_ROLLUP_MAX_DELAY 1 // unit millisecond
#define TSDB_MAX_ROLLUP_MAX_DELAY (15 * 60 * 1000)
#define TSDB_MAX_ROLLUP_MAX_DELAY (15 * 60 * 1000)
...
@@ -386,7 +389,7 @@ typedef enum ELogicConditionType {
...
@@ -386,7 +389,7 @@ typedef enum ELogicConditionType {
#define TSDB_DEFAULT_EXPLAIN_VERBOSE false
#define TSDB_DEFAULT_EXPLAIN_VERBOSE false
#define TSDB_EXPLAIN_RESULT_ROW_SIZE (16
*
1024)
#define TSDB_EXPLAIN_RESULT_ROW_SIZE (16
*
1024)
#define TSDB_EXPLAIN_RESULT_COLUMN_NAME "QUERY_PLAN"
#define TSDB_EXPLAIN_RESULT_COLUMN_NAME "QUERY_PLAN"
#define TSDB_MAX_FIELD_LEN 16384
#define TSDB_MAX_FIELD_LEN 16384
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
c49bb453
...
@@ -358,10 +358,10 @@ static void mndSetDefaultDbCfg(SDbCfg *pCfg) {
...
@@ -358,10 +358,10 @@ static void mndSetDefaultDbCfg(SDbCfg *pCfg) {
if
(
pCfg
->
numOfRetensions
<
0
)
pCfg
->
numOfRetensions
=
0
;
if
(
pCfg
->
numOfRetensions
<
0
)
pCfg
->
numOfRetensions
=
0
;
if
(
pCfg
->
schemaless
<
0
)
pCfg
->
schemaless
=
TSDB_DB_SCHEMALESS_OFF
;
if
(
pCfg
->
schemaless
<
0
)
pCfg
->
schemaless
=
TSDB_DB_SCHEMALESS_OFF
;
if
(
pCfg
->
walRetentionPeriod
<
0
&&
pCfg
->
walRetentionPeriod
!=
-
1
)
if
(
pCfg
->
walRetentionPeriod
<
0
&&
pCfg
->
walRetentionPeriod
!=
-
1
)
pCfg
->
walRetentionPeriod
=
TSDB_
DEFAULT_DB_WAL_RETENTION
_PERIOD
;
pCfg
->
walRetentionPeriod
=
TSDB_
REPS_DEF_DB_WAL_RET
_PERIOD
;
if
(
pCfg
->
walRetentionSize
<
0
&&
pCfg
->
walRetentionSize
!=
-
1
)
if
(
pCfg
->
walRetentionSize
<
0
&&
pCfg
->
walRetentionSize
!=
-
1
)
pCfg
->
walRetentionSize
=
TSDB_
DEFAULT_DB_WAL_RETENTION
_SIZE
;
pCfg
->
walRetentionSize
=
TSDB_
REPS_DEF_DB_WAL_RET
_SIZE
;
if
(
pCfg
->
walRollPeriod
<
0
)
pCfg
->
walRollPeriod
=
TSDB_
DEFAULT
_DB_WAL_ROLL_PERIOD
;
if
(
pCfg
->
walRollPeriod
<
0
)
pCfg
->
walRollPeriod
=
TSDB_
REPS_DEF
_DB_WAL_ROLL_PERIOD
;
if
(
pCfg
->
walSegmentSize
<
0
)
pCfg
->
walSegmentSize
=
TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE
;
if
(
pCfg
->
walSegmentSize
<
0
)
pCfg
->
walSegmentSize
=
TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE
;
}
}
...
...
source/libs/parser/src/parAstCreater.c
浏览文件 @
c49bb453
...
@@ -795,6 +795,20 @@ SNode* createSetOperator(SAstCreateContext* pCxt, ESetOperatorType type, SNode*
...
@@ -795,6 +795,20 @@ SNode* createSetOperator(SAstCreateContext* pCxt, ESetOperatorType type, SNode*
return
(
SNode
*
)
setOp
;
return
(
SNode
*
)
setOp
;
}
}
static
void
updateWalOptionsDefault
(
SDatabaseOptions
*
pOptions
)
{
if
(
!
pOptions
->
walRetentionPeriodIsSet
)
{
pOptions
->
walRetentionPeriod
=
pOptions
->
replica
>
1
?
TSDB_REPS_DEF_DB_WAL_RET_PERIOD
:
TSDB_REP_DEF_DB_WAL_RET_PERIOD
;
}
if
(
!
pOptions
->
walRetentionSizeIsSet
)
{
pOptions
->
walRetentionSize
=
pOptions
->
replica
>
1
?
TSDB_REPS_DEF_DB_WAL_RET_SIZE
:
TSDB_REP_DEF_DB_WAL_RET_SIZE
;
}
if
(
!
pOptions
->
walRollPeriodIsSet
)
{
pOptions
->
walRollPeriod
=
pOptions
->
replica
>
1
?
TSDB_REPS_DEF_DB_WAL_ROLL_PERIOD
:
TSDB_REP_DEF_DB_WAL_ROLL_PERIOD
;
}
}
SNode
*
createDefaultDatabaseOptions
(
SAstCreateContext
*
pCxt
)
{
SNode
*
createDefaultDatabaseOptions
(
SAstCreateContext
*
pCxt
)
{
CHECK_PARSER_STATUS
(
pCxt
);
CHECK_PARSER_STATUS
(
pCxt
);
SDatabaseOptions
*
pOptions
=
(
SDatabaseOptions
*
)
nodesMakeNode
(
QUERY_NODE_DATABASE_OPTIONS
);
SDatabaseOptions
*
pOptions
=
(
SDatabaseOptions
*
)
nodesMakeNode
(
QUERY_NODE_DATABASE_OPTIONS
);
...
@@ -819,9 +833,7 @@ SNode* createDefaultDatabaseOptions(SAstCreateContext* pCxt) {
...
@@ -819,9 +833,7 @@ SNode* createDefaultDatabaseOptions(SAstCreateContext* pCxt) {
pOptions
->
numOfVgroups
=
TSDB_DEFAULT_VN_PER_DB
;
pOptions
->
numOfVgroups
=
TSDB_DEFAULT_VN_PER_DB
;
pOptions
->
singleStable
=
TSDB_DEFAULT_DB_SINGLE_STABLE
;
pOptions
->
singleStable
=
TSDB_DEFAULT_DB_SINGLE_STABLE
;
pOptions
->
schemaless
=
TSDB_DEFAULT_DB_SCHEMALESS
;
pOptions
->
schemaless
=
TSDB_DEFAULT_DB_SCHEMALESS
;
pOptions
->
walRetentionPeriod
=
TSDB_DEFAULT_DB_WAL_RETENTION_PERIOD
;
updateWalOptionsDefault
(
pOptions
);
pOptions
->
walRetentionSize
=
TSDB_DEFAULT_DB_WAL_RETENTION_SIZE
;
pOptions
->
walRollPeriod
=
TSDB_DEFAULT_DB_WAL_ROLL_PERIOD
;
pOptions
->
walSegmentSize
=
TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE
;
pOptions
->
walSegmentSize
=
TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE
;
return
(
SNode
*
)
pOptions
;
return
(
SNode
*
)
pOptions
;
}
}
...
@@ -859,78 +871,83 @@ SNode* createAlterDatabaseOptions(SAstCreateContext* pCxt) {
...
@@ -859,78 +871,83 @@ SNode* createAlterDatabaseOptions(SAstCreateContext* pCxt) {
SNode
*
setDatabaseOption
(
SAstCreateContext
*
pCxt
,
SNode
*
pOptions
,
EDatabaseOptionType
type
,
void
*
pVal
)
{
SNode
*
setDatabaseOption
(
SAstCreateContext
*
pCxt
,
SNode
*
pOptions
,
EDatabaseOptionType
type
,
void
*
pVal
)
{
CHECK_PARSER_STATUS
(
pCxt
);
CHECK_PARSER_STATUS
(
pCxt
);
SDatabaseOptions
*
pDbOptions
=
(
SDatabaseOptions
*
)
pOptions
;
switch
(
type
)
{
switch
(
type
)
{
case
DB_OPTION_BUFFER
:
case
DB_OPTION_BUFFER
:
((
SDatabaseOptions
*
)
pOptions
)
->
buffer
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
buffer
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_CACHEMODEL
:
case
DB_OPTION_CACHEMODEL
:
COPY_STRING_FORM_STR_TOKEN
(
((
SDatabaseOptions
*
)
pOptions
)
->
cacheModelStr
,
(
SToken
*
)
pVal
);
COPY_STRING_FORM_STR_TOKEN
(
pDbOptions
->
cacheModelStr
,
(
SToken
*
)
pVal
);
break
;
break
;
case
DB_OPTION_CACHESIZE
:
case
DB_OPTION_CACHESIZE
:
((
SDatabaseOptions
*
)
pOptions
)
->
cacheLastSize
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
cacheLastSize
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_COMP
:
case
DB_OPTION_COMP
:
((
SDatabaseOptions
*
)
pOptions
)
->
compressionLevel
=
taosStr2Int8
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
compressionLevel
=
taosStr2Int8
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_DAYS
:
{
case
DB_OPTION_DAYS
:
{
SToken
*
pToken
=
pVal
;
SToken
*
pToken
=
pVal
;
if
(
TK_NK_INTEGER
==
pToken
->
type
)
{
if
(
TK_NK_INTEGER
==
pToken
->
type
)
{
((
SDatabaseOptions
*
)
pOptions
)
->
daysPerFile
=
taosStr2Int32
(
pToken
->
z
,
NULL
,
10
)
*
1440
;
pDbOptions
->
daysPerFile
=
taosStr2Int32
(
pToken
->
z
,
NULL
,
10
)
*
1440
;
}
else
{
}
else
{
((
SDatabaseOptions
*
)
pOptions
)
->
pDaysPerFile
=
(
SValueNode
*
)
createDurationValueNode
(
pCxt
,
pToken
);
pDbOptions
->
pDaysPerFile
=
(
SValueNode
*
)
createDurationValueNode
(
pCxt
,
pToken
);
}
}
break
;
break
;
}
}
case
DB_OPTION_FSYNC
:
case
DB_OPTION_FSYNC
:
((
SDatabaseOptions
*
)
pOptions
)
->
fsyncPeriod
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
fsyncPeriod
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_MAXROWS
:
case
DB_OPTION_MAXROWS
:
((
SDatabaseOptions
*
)
pOptions
)
->
maxRowsPerBlock
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
maxRowsPerBlock
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_MINROWS
:
case
DB_OPTION_MINROWS
:
((
SDatabaseOptions
*
)
pOptions
)
->
minRowsPerBlock
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
minRowsPerBlock
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_KEEP
:
case
DB_OPTION_KEEP
:
((
SDatabaseOptions
*
)
pOptions
)
->
pKeep
=
pVal
;
pDbOptions
->
pKeep
=
pVal
;
break
;
break
;
case
DB_OPTION_PAGES
:
case
DB_OPTION_PAGES
:
((
SDatabaseOptions
*
)
pOptions
)
->
pages
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
pages
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_PAGESIZE
:
case
DB_OPTION_PAGESIZE
:
((
SDatabaseOptions
*
)
pOptions
)
->
pagesize
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
pagesize
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_PRECISION
:
case
DB_OPTION_PRECISION
:
COPY_STRING_FORM_STR_TOKEN
(
((
SDatabaseOptions
*
)
pOptions
)
->
precisionStr
,
(
SToken
*
)
pVal
);
COPY_STRING_FORM_STR_TOKEN
(
pDbOptions
->
precisionStr
,
(
SToken
*
)
pVal
);
break
;
break
;
case
DB_OPTION_REPLICA
:
case
DB_OPTION_REPLICA
:
((
SDatabaseOptions
*
)
pOptions
)
->
replica
=
taosStr2Int8
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
replica
=
taosStr2Int8
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
updateWalOptionsDefault
(
pDbOptions
);
break
;
break
;
case
DB_OPTION_STRICT
:
case
DB_OPTION_STRICT
:
COPY_STRING_FORM_STR_TOKEN
(
((
SDatabaseOptions
*
)
pOptions
)
->
strictStr
,
(
SToken
*
)
pVal
);
COPY_STRING_FORM_STR_TOKEN
(
pDbOptions
->
strictStr
,
(
SToken
*
)
pVal
);
break
;
break
;
case
DB_OPTION_WAL
:
case
DB_OPTION_WAL
:
((
SDatabaseOptions
*
)
pOptions
)
->
walLevel
=
taosStr2Int8
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
walLevel
=
taosStr2Int8
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_VGROUPS
:
case
DB_OPTION_VGROUPS
:
((
SDatabaseOptions
*
)
pOptions
)
->
numOfVgroups
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
numOfVgroups
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_SINGLE_STABLE
:
case
DB_OPTION_SINGLE_STABLE
:
((
SDatabaseOptions
*
)
pOptions
)
->
singleStable
=
taosStr2Int8
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
singleStable
=
taosStr2Int8
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
case
DB_OPTION_RETENTIONS
:
case
DB_OPTION_RETENTIONS
:
((
SDatabaseOptions
*
)
pOptions
)
->
pRetentions
=
pVal
;
pDbOptions
->
pRetentions
=
pVal
;
break
;
break
;
case
DB_OPTION_WAL_RETENTION_PERIOD
:
case
DB_OPTION_WAL_RETENTION_PERIOD
:
((
SDatabaseOptions
*
)
pOptions
)
->
walRetentionPeriod
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
walRetentionPeriod
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
walRetentionPeriodIsSet
=
true
;
break
;
break
;
case
DB_OPTION_WAL_RETENTION_SIZE
:
case
DB_OPTION_WAL_RETENTION_SIZE
:
((
SDatabaseOptions
*
)
pOptions
)
->
walRetentionSize
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
walRetentionSize
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
walRetentionSizeIsSet
=
true
;
break
;
break
;
case
DB_OPTION_WAL_ROLL_PERIOD
:
case
DB_OPTION_WAL_ROLL_PERIOD
:
((
SDatabaseOptions
*
)
pOptions
)
->
walRollPeriod
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
walRollPeriod
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
walRollPeriodIsSet
=
true
;
break
;
break
;
case
DB_OPTION_WAL_SEGMENT_SIZE
:
case
DB_OPTION_WAL_SEGMENT_SIZE
:
((
SDatabaseOptions
*
)
pOptions
)
->
walSegmentSize
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
pDbOptions
->
walSegmentSize
=
taosStr2Int32
(((
SToken
*
)
pVal
)
->
z
,
NULL
,
10
);
break
;
break
;
default:
default:
break
;
break
;
...
...
source/libs/parser/test/parInitialCTest.cpp
浏览文件 @
c49bb453
...
@@ -111,9 +111,9 @@ TEST_F(ParserInitialCTest, createDatabase) {
...
@@ -111,9 +111,9 @@ TEST_F(ParserInitialCTest, createDatabase) {
expect
.
numOfVgroups
=
TSDB_DEFAULT_VN_PER_DB
;
expect
.
numOfVgroups
=
TSDB_DEFAULT_VN_PER_DB
;
expect
.
numOfStables
=
TSDB_DEFAULT_DB_SINGLE_STABLE
;
expect
.
numOfStables
=
TSDB_DEFAULT_DB_SINGLE_STABLE
;
expect
.
schemaless
=
TSDB_DEFAULT_DB_SCHEMALESS
;
expect
.
schemaless
=
TSDB_DEFAULT_DB_SCHEMALESS
;
expect
.
walRetentionPeriod
=
TSDB_
DEFAULT_DB_WAL_RETENTION
_PERIOD
;
expect
.
walRetentionPeriod
=
TSDB_
REP_DEF_DB_WAL_RET
_PERIOD
;
expect
.
walRetentionSize
=
TSDB_
DEFAULT_DB_WAL_RETENTION
_SIZE
;
expect
.
walRetentionSize
=
TSDB_
REP_DEF_DB_WAL_RET
_SIZE
;
expect
.
walRollPeriod
=
TSDB_
DEFAULT
_DB_WAL_ROLL_PERIOD
;
expect
.
walRollPeriod
=
TSDB_
REP_DEF
_DB_WAL_ROLL_PERIOD
;
expect
.
walSegmentSize
=
TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE
;
expect
.
walSegmentSize
=
TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE
;
};
};
...
@@ -266,6 +266,14 @@ TEST_F(ParserInitialCTest, createDatabase) {
...
@@ -266,6 +266,14 @@ TEST_F(ParserInitialCTest, createDatabase) {
"DURATION 100m "
"DURATION 100m "
"KEEP 1440m,300h,400d "
);
"KEEP 1440m,300h,400d "
);
clearCreateDbReq
();
clearCreateDbReq
();
setCreateDbReqFunc
(
"wxy_db"
,
1
);
setDbReplicaFunc
(
3
);
setDbWalRetentionPeriod
(
TSDB_REPS_DEF_DB_WAL_RET_PERIOD
);
setDbWalRetentionSize
(
TSDB_REPS_DEF_DB_WAL_RET_SIZE
);
setDbWalRollPeriod
(
TSDB_REPS_DEF_DB_WAL_ROLL_PERIOD
);
run
(
"CREATE DATABASE IF NOT EXISTS wxy_db REPLICA 3"
);
clearCreateDbReq
();
}
}
TEST_F
(
ParserInitialCTest
,
createDatabaseSemanticCheck
)
{
TEST_F
(
ParserInitialCTest
,
createDatabaseSemanticCheck
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录