Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e6e95dff
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
e6e95dff
编写于
7月 26, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(wal): config error
上级
ecb7a9c1
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
23 addition
and
21 deletion
+23
-21
include/common/tmsg.h
include/common/tmsg.h
+2
-2
source/common/src/tmsg.c
source/common/src/tmsg.c
+4
-4
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+2
-2
source/dnode/mnode/impl/inc/mndDef.h
source/dnode/mnode/impl/inc/mndDef.h
+2
-2
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+8
-6
tests/system-test/7-tmq/db.py
tests/system-test/7-tmq/db.py
+1
-1
tests/system-test/7-tmq/tmqDelete-1ctb.py
tests/system-test/7-tmq/tmqDelete-1ctb.py
+1
-1
tests/system-test/7-tmq/tmqDelete-multiCtb.py
tests/system-test/7-tmq/tmqDelete-multiCtb.py
+1
-1
tests/system-test/7-tmq/tmqDnodeRestart.py
tests/system-test/7-tmq/tmqDnodeRestart.py
+1
-1
tests/system-test/7-tmq/tmqUpdateWithConsume.py
tests/system-test/7-tmq/tmqUpdateWithConsume.py
+1
-1
未找到文件。
include/common/tmsg.h
浏览文件 @
e6e95dff
...
...
@@ -1155,9 +1155,9 @@ typedef struct {
SArray
*
pRetensions
;
// SRetention
void
*
pTsma
;
int32_t
walRetentionPeriod
;
int
32
_t
walRetentionSize
;
int
64
_t
walRetentionSize
;
int32_t
walRollPeriod
;
int
32
_t
walSegmentSize
;
int
64
_t
walSegmentSize
;
}
SCreateVnodeReq
;
int32_t
tSerializeSCreateVnodeReq
(
void
*
buf
,
int32_t
bufLen
,
SCreateVnodeReq
*
pReq
);
...
...
source/common/src/tmsg.c
浏览文件 @
e6e95dff
...
...
@@ -3751,9 +3751,9 @@ int32_t tSerializeSCreateVnodeReq(void *buf, int32_t bufLen, SCreateVnodeReq *pR
if
(
tEncodeBinary
(
&
encoder
,
(
const
uint8_t
*
)
pReq
->
pTsma
,
tsmaLen
)
<
0
)
return
-
1
;
}
if
(
tEncodeI32
(
&
encoder
,
pReq
->
walRetentionPeriod
)
<
0
)
return
-
1
;
if
(
tEncodeI
32
(
&
encoder
,
pReq
->
walRetentionSize
)
<
0
)
return
-
1
;
if
(
tEncodeI
64
(
&
encoder
,
pReq
->
walRetentionSize
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
&
encoder
,
pReq
->
walRollPeriod
)
<
0
)
return
-
1
;
if
(
tEncodeI
32
(
&
encoder
,
pReq
->
walSegmentSize
)
<
0
)
return
-
1
;
if
(
tEncodeI
64
(
&
encoder
,
pReq
->
walSegmentSize
)
<
0
)
return
-
1
;
tEndEncode
(
&
encoder
);
...
...
@@ -3823,9 +3823,9 @@ int32_t tDeserializeSCreateVnodeReq(void *buf, int32_t bufLen, SCreateVnodeReq *
}
if
(
tDecodeI32
(
&
decoder
,
&
pReq
->
walRetentionPeriod
)
<
0
)
return
-
1
;
if
(
tDecodeI
32
(
&
decoder
,
&
pReq
->
walRetentionSize
)
<
0
)
return
-
1
;
if
(
tDecodeI
64
(
&
decoder
,
&
pReq
->
walRetentionSize
)
<
0
)
return
-
1
;
if
(
tDecodeI32
(
&
decoder
,
&
pReq
->
walRollPeriod
)
<
0
)
return
-
1
;
if
(
tDecodeI
32
(
&
decoder
,
&
pReq
->
walSegmentSize
)
<
0
)
return
-
1
;
if
(
tDecodeI
64
(
&
decoder
,
&
pReq
->
walSegmentSize
)
<
0
)
return
-
1
;
tEndDecode
(
&
decoder
);
tDecoderClear
(
&
decoder
);
...
...
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
浏览文件 @
e6e95dff
...
...
@@ -162,8 +162,8 @@ static void vmGenerateVnodeCfg(SCreateVnodeReq *pCreate, SVnodeCfg *pCfg) {
pCfg
->
walCfg
.
vgId
=
pCreate
->
vgId
;
pCfg
->
walCfg
.
fsyncPeriod
=
pCreate
->
fsyncPeriod
;
pCfg
->
walCfg
.
retentionPeriod
=
pCreate
->
walRetentionPeriod
;
pCfg
->
walCfg
.
rollPeriod
=
pCreate
->
walR
etentionSize
;
pCfg
->
walCfg
.
retentionSize
=
pCreate
->
walR
ollPeriod
;
pCfg
->
walCfg
.
rollPeriod
=
pCreate
->
walR
ollPeriod
;
pCfg
->
walCfg
.
retentionSize
=
pCreate
->
walR
etentionSize
;
pCfg
->
walCfg
.
segSize
=
pCreate
->
walSegmentSize
;
pCfg
->
walCfg
.
level
=
pCreate
->
walLevel
;
...
...
source/dnode/mnode/impl/inc/mndDef.h
浏览文件 @
e6e95dff
...
...
@@ -306,9 +306,9 @@ typedef struct {
int32_t
numOfRetensions
;
SArray
*
pRetensions
;
int32_t
walRetentionPeriod
;
int
32
_t
walRetentionSize
;
int
64
_t
walRetentionSize
;
int32_t
walRollPeriod
;
int
32
_t
walSegmentSize
;
int
64
_t
walSegmentSize
;
}
SDbCfg
;
typedef
struct
{
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
e6e95dff
...
...
@@ -121,9 +121,9 @@ static SSdbRaw *mndDbActionEncode(SDbObj *pDb) {
}
SDB_SET_INT8
(
pRaw
,
dataPos
,
pDb
->
cfg
.
schemaless
,
_OVER
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
pDb
->
cfg
.
walRetentionPeriod
,
_OVER
)
SDB_SET_INT
32
(
pRaw
,
dataPos
,
pDb
->
cfg
.
walRetentionSize
,
_OVER
)
SDB_SET_INT
64
(
pRaw
,
dataPos
,
pDb
->
cfg
.
walRetentionSize
,
_OVER
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
pDb
->
cfg
.
walRollPeriod
,
_OVER
)
SDB_SET_INT
32
(
pRaw
,
dataPos
,
pDb
->
cfg
.
walSegmentSize
,
_OVER
)
SDB_SET_INT
64
(
pRaw
,
dataPos
,
pDb
->
cfg
.
walSegmentSize
,
_OVER
)
SDB_SET_RESERVE
(
pRaw
,
dataPos
,
DB_RESERVE_SIZE
,
_OVER
)
SDB_SET_DATALEN
(
pRaw
,
dataPos
,
_OVER
)
...
...
@@ -204,9 +204,9 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) {
}
SDB_GET_INT8
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
schemaless
,
_OVER
)
SDB_GET_INT32
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
walRetentionPeriod
,
_OVER
)
SDB_GET_INT
32
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
walRetentionSize
,
_OVER
)
SDB_GET_INT
64
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
walRetentionSize
,
_OVER
)
SDB_GET_INT32
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
walRollPeriod
,
_OVER
)
SDB_GET_INT
32
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
walSegmentSize
,
_OVER
)
SDB_GET_INT
64
(
pRaw
,
dataPos
,
&
pDb
->
cfg
.
walSegmentSize
,
_OVER
)
SDB_GET_RESERVE
(
pRaw
,
dataPos
,
DB_RESERVE_SIZE
,
_OVER
)
taosInitRWLatch
(
&
pDb
->
lock
);
...
...
@@ -357,8 +357,10 @@ static void mndSetDefaultDbCfg(SDbCfg *pCfg) {
if
(
pCfg
->
cacheLastSize
<=
0
)
pCfg
->
cacheLastSize
=
TSDB_DEFAULT_CACHE_SIZE
;
if
(
pCfg
->
numOfRetensions
<
0
)
pCfg
->
numOfRetensions
=
0
;
if
(
pCfg
->
schemaless
<
0
)
pCfg
->
schemaless
=
TSDB_DB_SCHEMALESS_OFF
;
if
(
pCfg
->
walRetentionPeriod
<
0
)
pCfg
->
walRetentionPeriod
=
TSDB_DEFAULT_DB_WAL_RETENTION_PERIOD
;
if
(
pCfg
->
walRetentionSize
<
0
)
pCfg
->
walRetentionSize
=
TSDB_DEFAULT_DB_WAL_RETENTION_SIZE
;
if
(
pCfg
->
walRetentionPeriod
<
0
&&
pCfg
->
walRetentionPeriod
!=
-
1
)
pCfg
->
walRetentionPeriod
=
TSDB_DEFAULT_DB_WAL_RETENTION_PERIOD
;
if
(
pCfg
->
walRetentionSize
<
0
&&
pCfg
->
walRetentionSize
!=
-
1
)
pCfg
->
walRetentionSize
=
TSDB_DEFAULT_DB_WAL_RETENTION_SIZE
;
if
(
pCfg
->
walRollPeriod
<
0
)
pCfg
->
walRollPeriod
=
TSDB_DEFAULT_DB_WAL_ROLL_PERIOD
;
if
(
pCfg
->
walSegmentSize
<
0
)
pCfg
->
walSegmentSize
=
TSDB_DEFAULT_DB_WAL_SEGMENT_SIZE
;
}
...
...
tests/system-test/7-tmq/db.py
浏览文件 @
e6e95dff
...
...
@@ -118,7 +118,7 @@ class TDTestCase:
if
dropFlag
==
1
:
tsql
.
execute
(
"drop database if exists %s"
%
(
dbName
))
tsql
.
execute
(
"create database if not exists %s vgroups %d replica %d"
%
(
dbName
,
vgroups
,
replica
))
tsql
.
execute
(
"create database if not exists %s vgroups %d replica %d
wal_retention_period -1 wal_retention_size -1
"
%
(
dbName
,
vgroups
,
replica
))
tdLog
.
debug
(
"complete to create database %s"
%
(
dbName
))
return
...
...
tests/system-test/7-tmq/tmqDelete-1ctb.py
浏览文件 @
e6e95dff
...
...
@@ -52,7 +52,7 @@ class TDTestCase:
paraDict
[
'rowsPerTbl'
]
=
self
.
rowsPerTbl
tmqCom
.
initConsumerTable
()
tdCom
.
create_database
(
tdSql
,
paraDict
[
"dbName"
],
paraDict
[
"dropFlag"
],
vgroups
=
paraDict
[
"vgroups"
],
replica
=
1
)
tdCom
.
create_database
(
tdSql
,
paraDict
[
"dbName"
],
paraDict
[
"dropFlag"
],
vgroups
=
paraDict
[
"vgroups"
],
replica
=
1
,
wal_retention_size
=-
1
,
wal_retention_period
=-
1
)
tdLog
.
info
(
"create stb"
)
tmqCom
.
create_stable
(
tdSql
,
dbName
=
paraDict
[
"dbName"
],
stbName
=
paraDict
[
"stbName"
])
tdLog
.
info
(
"create ctb"
)
...
...
tests/system-test/7-tmq/tmqDelete-multiCtb.py
浏览文件 @
e6e95dff
...
...
@@ -52,7 +52,7 @@ class TDTestCase:
paraDict
[
'rowsPerTbl'
]
=
self
.
rowsPerTbl
tmqCom
.
initConsumerTable
()
tdCom
.
create_database
(
tdSql
,
paraDict
[
"dbName"
],
paraDict
[
"dropFlag"
],
vgroups
=
paraDict
[
"vgroups"
],
replica
=
1
)
tdCom
.
create_database
(
tdSql
,
paraDict
[
"dbName"
],
paraDict
[
"dropFlag"
],
vgroups
=
paraDict
[
"vgroups"
],
replica
=
1
,
wal_retention_size
=-
1
,
wal_retention_period
=-
1
)
tdLog
.
info
(
"create stb"
)
tmqCom
.
create_stable
(
tdSql
,
dbName
=
paraDict
[
"dbName"
],
stbName
=
paraDict
[
"stbName"
])
tdLog
.
info
(
"create ctb"
)
...
...
tests/system-test/7-tmq/tmqDnodeRestart.py
浏览文件 @
e6e95dff
...
...
@@ -53,7 +53,7 @@ class TDTestCase:
paraDict
[
'rowsPerTbl'
]
=
self
.
rowsPerTbl
tmqCom
.
initConsumerTable
()
tdCom
.
create_database
(
tdSql
,
paraDict
[
"dbName"
],
paraDict
[
"dropFlag"
],
vgroups
=
paraDict
[
"vgroups"
],
replica
=
1
)
tdCom
.
create_database
(
tdSql
,
paraDict
[
"dbName"
],
paraDict
[
"dropFlag"
],
vgroups
=
paraDict
[
"vgroups"
],
replica
=
1
,
wal_retention_size
=-
1
,
wal_retention_period
=-
1
)
tdLog
.
info
(
"create stb"
)
tmqCom
.
create_stable
(
tdSql
,
dbName
=
paraDict
[
"dbName"
],
stbName
=
paraDict
[
"stbName"
])
tdLog
.
info
(
"create ctb"
)
...
...
tests/system-test/7-tmq/tmqUpdateWithConsume.py
浏览文件 @
e6e95dff
...
...
@@ -52,7 +52,7 @@ class TDTestCase:
paraDict
[
'rowsPerTbl'
]
=
self
.
rowsPerTbl
tmqCom
.
initConsumerTable
()
tdCom
.
create_database
(
tdSql
,
paraDict
[
"dbName"
],
paraDict
[
"dropFlag"
],
vgroups
=
paraDict
[
"vgroups"
],
replica
=
1
)
tdCom
.
create_database
(
tdSql
,
paraDict
[
"dbName"
],
paraDict
[
"dropFlag"
],
vgroups
=
paraDict
[
"vgroups"
],
replica
=
1
,
wal_retention_size
=-
1
,
wal_retention_period
=-
1
)
tdLog
.
info
(
"create stb"
)
tmqCom
.
create_stable
(
tdSql
,
dbName
=
paraDict
[
"dbName"
],
stbName
=
paraDict
[
"stbName"
])
tdLog
.
info
(
"create ctb"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录