Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1439bdcd
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
Star
22018
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看板
未验证
提交
1439bdcd
编写于
3月 08, 2023
作者:
S
Shengliang Guan
提交者:
GitHub
3月 08, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20306 from taosdata/feat/add-reboot-time
feat/add-reboot-time
上级
93dbe454
6dcb9c7f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
25 deletion
+33
-25
source/common/src/systable.c
source/common/src/systable.c
+2
-0
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+3
-0
source/dnode/mnode/impl/src/mndMnode.c
source/dnode/mnode/impl/src/mndMnode.c
+3
-0
tests/script/tsim/dnode/offline_reason.sim
tests/script/tsim/dnode/offline_reason.sim
+24
-24
tests/system-test/2-query/odbc.py
tests/system-test/2-query/odbc.py
+1
-1
未找到文件。
source/common/src/systable.c
浏览文件 @
1439bdcd
...
@@ -33,6 +33,7 @@ static const SSysDbTableSchema dnodesSchema[] = {
...
@@ -33,6 +33,7 @@ static const SSysDbTableSchema dnodesSchema[] = {
{.
name
=
"support_vnodes"
,
.
bytes
=
2
,
.
type
=
TSDB_DATA_TYPE_SMALLINT
,
.
sysInfo
=
true
},
{.
name
=
"support_vnodes"
,
.
bytes
=
2
,
.
type
=
TSDB_DATA_TYPE_SMALLINT
,
.
sysInfo
=
true
},
{.
name
=
"status"
,
.
bytes
=
10
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
{.
name
=
"status"
,
.
bytes
=
10
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
{.
name
=
"create_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
,
.
sysInfo
=
true
},
{.
name
=
"create_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
,
.
sysInfo
=
true
},
{.
name
=
"reboot_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
,
.
sysInfo
=
true
},
{.
name
=
"note"
,
.
bytes
=
256
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
{.
name
=
"note"
,
.
bytes
=
256
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
};
};
...
@@ -42,6 +43,7 @@ static const SSysDbTableSchema mnodesSchema[] = {
...
@@ -42,6 +43,7 @@ static const SSysDbTableSchema mnodesSchema[] = {
{.
name
=
"role"
,
.
bytes
=
12
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
{.
name
=
"role"
,
.
bytes
=
12
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
{.
name
=
"status"
,
.
bytes
=
9
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
{.
name
=
"status"
,
.
bytes
=
9
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_VARCHAR
,
.
sysInfo
=
true
},
{.
name
=
"create_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
,
.
sysInfo
=
true
},
{.
name
=
"create_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
,
.
sysInfo
=
true
},
{.
name
=
"reboot_time"
,
.
bytes
=
8
,
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
,
.
sysInfo
=
true
},
};
};
static
const
SSysDbTableSchema
modulesSchema
[]
=
{
static
const
SSysDbTableSchema
modulesSchema
[]
=
{
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
1439bdcd
...
@@ -1074,6 +1074,9 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
...
@@ -1074,6 +1074,9 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataSetVal
(
pColInfo
,
numOfRows
,
(
const
char
*
)
&
pDnode
->
createdTime
,
false
);
colDataSetVal
(
pColInfo
,
numOfRows
,
(
const
char
*
)
&
pDnode
->
createdTime
,
false
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataSetVal
(
pColInfo
,
numOfRows
,
(
const
char
*
)
&
pDnode
->
rebootTime
,
false
);
char
*
b
=
taosMemoryCalloc
(
VARSTR_HEADER_SIZE
+
strlen
(
offlineReason
[
pDnode
->
offlineReason
])
+
1
,
1
);
char
*
b
=
taosMemoryCalloc
(
VARSTR_HEADER_SIZE
+
strlen
(
offlineReason
[
pDnode
->
offlineReason
])
+
1
,
1
);
STR_TO_VARSTR
(
b
,
online
?
""
:
offlineReason
[
pDnode
->
offlineReason
]);
STR_TO_VARSTR
(
b
,
online
?
""
:
offlineReason
[
pDnode
->
offlineReason
]);
...
...
source/dnode/mnode/impl/src/mndMnode.c
浏览文件 @
1439bdcd
...
@@ -644,6 +644,9 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
...
@@ -644,6 +644,9 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataSetVal
(
pColInfo
,
numOfRows
,
(
const
char
*
)
&
pObj
->
createdTime
,
false
);
colDataSetVal
(
pColInfo
,
numOfRows
,
(
const
char
*
)
&
pObj
->
createdTime
,
false
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataSetVal
(
pColInfo
,
numOfRows
,
(
const
char
*
)
&
pObj
->
stateStartTime
,
false
);
numOfRows
++
;
numOfRows
++
;
sdbRelease
(
pSdb
,
pObj
);
sdbRelease
(
pSdb
,
pObj
);
}
}
...
...
tests/script/tsim/dnode/offline_reason.sim
浏览文件 @
1439bdcd
...
@@ -8,10 +8,10 @@ sql connect
...
@@ -8,10 +8,10 @@ sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7200
sql select * from information_schema.ins_dnodes
sql select * from information_schema.ins_dnodes
print dnode1 off: $data(1)[
6
]
print dnode1 off: $data(1)[
7
]
print dnode2 off: $data(2)[
6
]
print dnode2 off: $data(2)[
7
]
if $data(2)[
6
] != @status not received@ then
if $data(2)[
7
] != @status not received@ then
return -1
return -1
endi
endi
...
@@ -50,9 +50,9 @@ step3:
...
@@ -50,9 +50,9 @@ step3:
return -1
return -1
endi
endi
sql select * from information_schema.ins_dnodes
sql select * from information_schema.ins_dnodes
print dnode1 off: $data(1)[
6
]
print dnode1 off: $data(1)[
7
]
print dnode2 off: $data(2)[
6
]
print dnode2 off: $data(2)[
7
]
if $data(2)[
6
] != @status msg timeout@ then
if $data(2)[
7
] != @status msg timeout@ then
goto step3
goto step3
endi
endi
...
@@ -77,9 +77,9 @@ step5:
...
@@ -77,9 +77,9 @@ step5:
endi
endi
sql select * from information_schema.ins_dnodes
sql select * from information_schema.ins_dnodes
print dnode1 off: $data(1)[
6
]
print dnode1 off: $data(1)[
7
]
print dnode2 off: $data(3)[
6
]
print dnode2 off: $data(3)[
7
]
if $data(3)[
6
] != @dnodeId not match@ then
if $data(3)[
7
] != @dnodeId not match@ then
goto step5
goto step5
endi
endi
...
@@ -98,10 +98,10 @@ step6:
...
@@ -98,10 +98,10 @@ step6:
endi
endi
sql select * from information_schema.ins_dnodes
sql select * from information_schema.ins_dnodes
print dnode1 off: $data(1)[
6
]
print dnode1 off: $data(1)[
7
]
print dnode2 off: $data(3)[
6
]
print dnode2 off: $data(3)[
7
]
print dnode3 off: $data(4)[6
]
print dnode3 off: $data(4)[6
7
if $data(4)[
6
] != @interval not match@ then
if $data(4)[
7
] != @interval not match@ then
goto step6
goto step6
endi
endi
...
@@ -120,11 +120,11 @@ step7:
...
@@ -120,11 +120,11 @@ step7:
endi
endi
sql select * from information_schema.ins_dnodes
sql select * from information_schema.ins_dnodes
print dnode1 off: $data(1)[
6
]
print dnode1 off: $data(1)[
7
]
print dnode3 off: $data(3)[
6
]
print dnode3 off: $data(3)[
7
]
print dnode4 off: $data(4)[
6
]
print dnode4 off: $data(4)[
7
]
print dnode5 off: $data(5)[
6
]
print dnode5 off: $data(5)[
7
]
if $data(5)[
6
] != @locale not match@ then
if $data(5)[
7
] != @locale not match@ then
goto step7
goto step7
endi
endi
...
@@ -143,12 +143,12 @@ step8:
...
@@ -143,12 +143,12 @@ step8:
endi
endi
sql select * from information_schema.ins_dnodes
sql select * from information_schema.ins_dnodes
print dnode1 off: $data(1)[
6
]
print dnode1 off: $data(1)[
7
]
print dnode3 off: $data(3)[
6
]
print dnode3 off: $data(3)[
7
]
print dnode4 off: $data(4)[
6
]
print dnode4 off: $data(4)[
7
]
print dnode5 off: $data(5)[
6
]
print dnode5 off: $data(5)[
7
]
print dnode6 off: $data(6)[
6
]
print dnode6 off: $data(6)[
7
]
if $data(6)[
6
] != @charset not match@ then
if $data(6)[
7
] != @charset not match@ then
goto step8
goto step8
endi
endi
...
...
tests/system-test/2-query/odbc.py
浏览文件 @
1439bdcd
...
@@ -22,7 +22,7 @@ class TDTestCase:
...
@@ -22,7 +22,7 @@ class TDTestCase:
tdSql
.
execute
(
"insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)"
)
tdSql
.
execute
(
"insert into db.ctb using db.stb tags(1) (ts, c1) values (now, 1)"
)
tdSql
.
query
(
"select count(*) from information_schema.ins_columns"
)
tdSql
.
query
(
"select count(*) from information_schema.ins_columns"
)
tdSql
.
checkData
(
0
,
0
,
2
69
)
tdSql
.
checkData
(
0
,
0
,
2
71
)
tdSql
.
query
(
"select * from information_schema.ins_columns where table_name = 'ntb'"
)
tdSql
.
query
(
"select * from information_schema.ins_columns where table_name = 'ntb'"
)
tdSql
.
checkRows
(
14
)
tdSql
.
checkRows
(
14
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录