Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4ab720c7
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看板
提交
4ab720c7
编写于
2月 17, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
show trans
上级
3c152bfd
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
12 addition
and
4 deletion
+12
-4
source/dnode/mnode/impl/inc/mndDef.h
source/dnode/mnode/impl/inc/mndDef.h
+1
-1
source/dnode/mnode/impl/src/mndTrans.c
source/dnode/mnode/impl/src/mndTrans.c
+11
-3
未找到文件。
source/dnode/mnode/impl/inc/mndDef.h
浏览文件 @
4ab720c7
...
...
@@ -143,7 +143,7 @@ typedef struct {
int64_t
lastExecTime
;
int32_t
transType
;
uint64_t
dbUid
;
char
dbname
[
TSDB_DB_NAME_LEN
];
char
dbname
[
TSDB_DB_
F
NAME_LEN
];
char
lastError
[
TSDB_TRANS_DESC_LEN
];
}
STrans
;
...
...
source/dnode/mnode/impl/src/mndTrans.c
浏览文件 @
4ab720c7
...
...
@@ -124,6 +124,10 @@ static SSdbRaw *mndTransActionEncode(STrans *pTrans) {
SDB_SET_INT32
(
pRaw
,
dataPos
,
pTrans
->
id
,
TRANS_ENCODE_OVER
)
SDB_SET_INT8
(
pRaw
,
dataPos
,
pTrans
->
policy
,
TRANS_ENCODE_OVER
)
SDB_SET_INT8
(
pRaw
,
dataPos
,
pTrans
->
stage
,
TRANS_ENCODE_OVER
)
SDB_SET_INT64
(
pRaw
,
dataPos
,
pTrans
->
createdTime
,
TRANS_ENCODE_OVER
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
pTrans
->
transType
,
TRANS_ENCODE_OVER
)
SDB_SET_INT64
(
pRaw
,
dataPos
,
pTrans
->
dbUid
,
TRANS_ENCODE_OVER
)
SDB_SET_BINARY
(
pRaw
,
dataPos
,
pTrans
->
dbname
,
TSDB_DB_FNAME_LEN
,
TRANS_ENCODE_OVER
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
redoLogNum
,
TRANS_ENCODE_OVER
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
undoLogNum
,
TRANS_ENCODE_OVER
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
commitLogNum
,
TRANS_ENCODE_OVER
)
...
...
@@ -229,6 +233,10 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) {
SDB_GET_INT32
(
pRaw
,
dataPos
,
&
pTrans
->
id
,
TRANS_DECODE_OVER
)
SDB_GET_INT8
(
pRaw
,
dataPos
,
(
int8_t
*
)
&
pTrans
->
policy
,
TRANS_DECODE_OVER
)
SDB_GET_INT8
(
pRaw
,
dataPos
,
(
int8_t
*
)
&
pTrans
->
stage
,
TRANS_DECODE_OVER
)
SDB_GET_INT64
(
pRaw
,
dataPos
,
&
pTrans
->
createdTime
,
TRANS_DECODE_OVER
)
SDB_GET_INT32
(
pRaw
,
dataPos
,
&
pTrans
->
transType
,
TRANS_DECODE_OVER
)
SDB_GET_INT64
(
pRaw
,
dataPos
,
&
pTrans
->
dbUid
,
TRANS_DECODE_OVER
)
SDB_GET_BINARY
(
pRaw
,
dataPos
,
pTrans
->
dbname
,
TSDB_DB_FNAME_LEN
,
TRANS_DECODE_OVER
)
SDB_GET_INT32
(
pRaw
,
dataPos
,
&
redoLogNum
,
TRANS_DECODE_OVER
)
SDB_GET_INT32
(
pRaw
,
dataPos
,
&
undoLogNum
,
TRANS_DECODE_OVER
)
SDB_GET_INT32
(
pRaw
,
dataPos
,
&
commitLogNum
,
TRANS_DECODE_OVER
)
...
...
@@ -1034,13 +1042,13 @@ static int32_t mndGetTransMeta(SMnodeMsg *pReq, SShowObj *pShow, STableMetaRsp *
pSchema
[
cols
].
bytes
=
pShow
->
bytes
[
cols
];
cols
++
;
pShow
->
bytes
[
cols
]
=
(
TSDB_DB_NAME_LEN
-
1
)
+
VARSTR_HEADER_SIZE
;
pShow
->
bytes
[
cols
]
=
TSDB_DB_NAME_LEN
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"db"
);
pSchema
[
cols
].
bytes
=
pShow
->
bytes
[
cols
];
cols
++
;
pShow
->
bytes
[
cols
]
=
(
TSDB_TRANS_DESC_LEN
-
1
)
+
VARSTR_HEADER_SIZE
;
pShow
->
bytes
[
cols
]
=
TSDB_TRANS_DESC_LEN
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"type"
);
pSchema
[
cols
].
bytes
=
pShow
->
bytes
[
cols
];
...
...
@@ -1052,7 +1060,7 @@ static int32_t mndGetTransMeta(SMnodeMsg *pReq, SShowObj *pShow, STableMetaRsp *
pSchema
[
cols
].
bytes
=
pShow
->
bytes
[
cols
];
cols
++
;
pShow
->
bytes
[
cols
]
=
(
TSDB_TRANS_ERROR_LEN
-
1
)
+
VARSTR_HEADER_SIZE
;
pShow
->
bytes
[
cols
]
=
TSDB_TRANS_ERROR_LEN
+
VARSTR_HEADER_SIZE
;
pSchema
[
cols
].
type
=
TSDB_DATA_TYPE_BINARY
;
strcpy
(
pSchema
[
cols
].
name
,
"last_error"
);
pSchema
[
cols
].
bytes
=
pShow
->
bytes
[
cols
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录