Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
507adf9e
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
507adf9e
编写于
8月 08, 2022
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:error in tmp for snapshot
上级
9f9788c2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
9 deletion
+14
-9
examples/c/tmq_taosx.c
examples/c/tmq_taosx.c
+2
-0
source/common/src/tmsg.c
source/common/src/tmsg.c
+3
-3
source/dnode/vnode/src/meta/metaSnapshot.c
source/dnode/vnode/src/meta/metaSnapshot.c
+8
-5
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+1
-1
未找到文件。
examples/c/tmq_taosx.c
浏览文件 @
507adf9e
...
...
@@ -379,6 +379,8 @@ tmq_t* build_consumer() {
tmq_conf_set
(
conf
,
"td.connect.pass"
,
"taosdata"
);
tmq_conf_set
(
conf
,
"msg.with.table.name"
,
"true"
);
tmq_conf_set
(
conf
,
"enable.auto.commit"
,
"true"
);
tmq_conf_set
(
conf
,
"experimental.snapshot.enable"
,
"true"
);
/*tmq_conf_set(conf, "experimental.snapshot.enable", "true");*/
...
...
source/common/src/tmsg.c
浏览文件 @
507adf9e
...
...
@@ -5562,7 +5562,7 @@ void tFreeSMAlterStbRsp(SMAlterStbRsp *pRsp) {
int32_t
tEncodeSTqOffsetVal
(
SEncoder
*
pEncoder
,
const
STqOffsetVal
*
pOffsetVal
)
{
if
(
tEncodeI8
(
pEncoder
,
pOffsetVal
->
type
)
<
0
)
return
-
1
;
if
(
pOffsetVal
->
type
==
TMQ_OFFSET__SNAPSHOT_DATA
)
{
if
(
pOffsetVal
->
type
==
TMQ_OFFSET__SNAPSHOT_DATA
||
pOffsetVal
->
type
==
TMQ_OFFSET__SNAPSHOT_META
)
{
if
(
tEncodeI64
(
pEncoder
,
pOffsetVal
->
uid
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
pEncoder
,
pOffsetVal
->
ts
)
<
0
)
return
-
1
;
}
else
if
(
pOffsetVal
->
type
==
TMQ_OFFSET__LOG
)
{
...
...
@@ -5577,7 +5577,7 @@ int32_t tEncodeSTqOffsetVal(SEncoder *pEncoder, const STqOffsetVal *pOffsetVal)
int32_t
tDecodeSTqOffsetVal
(
SDecoder
*
pDecoder
,
STqOffsetVal
*
pOffsetVal
)
{
if
(
tDecodeI8
(
pDecoder
,
&
pOffsetVal
->
type
)
<
0
)
return
-
1
;
if
(
pOffsetVal
->
type
==
TMQ_OFFSET__SNAPSHOT_DATA
)
{
if
(
pOffsetVal
->
type
==
TMQ_OFFSET__SNAPSHOT_DATA
||
pOffsetVal
->
type
==
TMQ_OFFSET__SNAPSHOT_META
)
{
if
(
tDecodeI64
(
pDecoder
,
&
pOffsetVal
->
uid
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
pDecoder
,
&
pOffsetVal
->
ts
)
<
0
)
return
-
1
;
}
else
if
(
pOffsetVal
->
type
==
TMQ_OFFSET__LOG
)
{
...
...
@@ -5600,7 +5600,7 @@ int32_t tFormatOffset(char *buf, int32_t maxLen, const STqOffsetVal *pVal) {
snprintf
(
buf
,
maxLen
,
"offset(reset to latest)"
);
}
else
if
(
pVal
->
type
==
TMQ_OFFSET__LOG
)
{
snprintf
(
buf
,
maxLen
,
"offset(log) ver:%"
PRId64
,
pVal
->
version
);
}
else
if
(
pVal
->
type
==
TMQ_OFFSET__SNAPSHOT_DATA
)
{
}
else
if
(
pVal
->
type
==
TMQ_OFFSET__SNAPSHOT_DATA
||
pVal
->
type
==
TMQ_OFFSET__SNAPSHOT_META
)
{
snprintf
(
buf
,
maxLen
,
"offset(ss data) uid:%"
PRId64
", ts:%"
PRId64
,
pVal
->
uid
,
pVal
->
ts
);
}
else
{
ASSERT
(
0
);
...
...
source/dnode/vnode/src/meta/metaSnapshot.c
浏览文件 @
507adf9e
...
...
@@ -267,14 +267,14 @@ int32_t destroySnapContext(SSnapContext* ctx){
static
int32_t
buildNormalChildTableInfo
(
SVCreateTbReq
*
req
,
void
**
pBuf
,
int32_t
*
contLen
){
int32_t
ret
=
0
;
SVCreateTbBatchReq
reqs
=
{};
SVCreateTbBatchReq
reqs
=
{
0
};
reqs
.
pArray
=
taosArrayInit
(
1
,
sizeof
(
struct
SVCreateTbReq
));
if
(
NULL
==
reqs
.
pArray
){
ret
=
-
1
;
goto
end
;
}
taosArrayPush
(
reqs
.
pArray
,
&
req
);
taosArrayPush
(
reqs
.
pArray
,
req
);
reqs
.
nReqs
=
1
;
tEncodeSize
(
tEncodeSVCreateTbBatchReq
,
&
reqs
,
*
contLen
,
ret
);
...
...
@@ -289,7 +289,7 @@ static int32_t buildNormalChildTableInfo(SVCreateTbReq *req, void **pBuf, int32_
goto
end
;
}
SEncoder
coder
=
{
0
};
tEncoderInit
(
&
coder
,
*
pBuf
+
sizeof
(
SMsgHead
),
*
contLen
);
tEncoderInit
(
&
coder
,
POINTER_SHIFT
(
*
pBuf
,
sizeof
(
SMsgHead
)
),
*
contLen
);
if
(
tEncodeSVCreateTbBatchReq
(
&
coder
,
&
reqs
)
<
0
)
{
taosMemoryFreeClear
(
*
pBuf
);
tEncoderClear
(
&
coder
);
...
...
@@ -317,7 +317,7 @@ static int32_t buildSuperTableInfo(SVCreateStbReq *req, void **pBuf, int32_t *co
}
SEncoder
encoder
=
{
0
};
tEncoderInit
(
&
encoder
,
*
pBuf
+
sizeof
(
SMsgHead
),
*
contLen
);
tEncoderInit
(
&
encoder
,
POINTER_SHIFT
(
*
pBuf
,
sizeof
(
SMsgHead
)
),
*
contLen
);
if
(
tEncodeSVCreateStbReq
(
&
encoder
,
req
)
<
0
)
{
taosMemoryFreeClear
(
*
pBuf
);
tEncoderClear
(
&
encoder
);
...
...
@@ -418,7 +418,10 @@ int32_t getMetafromSnapShot(SSnapContext* ctx, void **pBuf, int32_t *contLen, in
||
(
ctx
->
subType
==
TOPIC_SUB_TYPE__TABLE
&&
me
.
type
==
TSDB_CHILD_TABLE
&&
me
.
ctbEntry
.
suid
==
ctx
->
suid
))
{
STableInfoForChildTable
*
data
=
(
STableInfoForChildTable
*
)
taosHashGet
(
ctx
->
suidInfo
,
&
me
.
ctbEntry
.
suid
,
sizeof
(
tb_uid_t
));
ASSERT
(
data
);
if
(
!
data
){
// if table has been deleted
tDecoderClear
(
&
dc
);
continue
;
}
SVCreateTbReq
req
=
{
0
};
req
.
type
=
TD_CHILD_TABLE
;
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
507adf9e
...
...
@@ -206,7 +206,7 @@ int32_t tqProcessOffsetCommitReq(STQ* pTq, char* msg, int32_t msgLen) {
}
tDecoderClear
(
&
decoder
);
if
(
offset
.
val
.
type
==
TMQ_OFFSET__SNAPSHOT_DATA
)
{
if
(
offset
.
val
.
type
==
TMQ_OFFSET__SNAPSHOT_DATA
||
offset
.
val
.
type
==
TMQ_OFFSET__SNAPSHOT_META
)
{
tqDebug
(
"receive offset commit msg to %s on vgId:%d, offset(type:snapshot) uid:%"
PRId64
", ts:%"
PRId64
,
offset
.
subKey
,
TD_VID
(
pTq
->
pVnode
),
offset
.
val
.
uid
,
offset
.
val
.
ts
);
}
else
if
(
offset
.
val
.
type
==
TMQ_OFFSET__LOG
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录