Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f45d1c69
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看板
提交
f45d1c69
编写于
8月 23, 2023
作者:
A
Alex Duan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: -t option and wal retention ci
上级
ec761444
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
20 deletion
+20
-20
tests/system-test/0-others/walRetention.py
tests/system-test/0-others/walRetention.py
+19
-19
tools/shell/src/shellWebsocket.c
tools/shell/src/shellWebsocket.c
+1
-1
未找到文件。
tests/system-test/0-others/walRetention.py
浏览文件 @
f45d1c69
...
...
@@ -161,9 +161,18 @@ class VNode :
# get log size
def
getWalsSize
(
self
):
size
=
0
lastSize
=
0
max
=
-
1
for
walFile
in
self
.
walFiles
:
size
+=
walFile
.
fsize
if
self
.
canDelete
(
walFile
)
==
False
:
tdLog
.
info
(
f
" calc vnode size
{
walFile
.
pathFile
}
size=
{
walFile
.
fsize
}
"
)
size
+=
walFile
.
fsize
if
max
<
walFile
.
startVer
:
max
=
walFile
.
startVer
lastSize
=
walFile
.
fsize
size
-=
lastSize
tdLog
.
info
(
f
" last file size need reduct . lastSize=
{
lastSize
}
"
)
return
size
# vnode
...
...
@@ -183,7 +192,7 @@ class VNode :
delTs
=
delTsLine
.
timestamp
()
for
walFile
in
self
.
walFiles
:
mt
=
datetime
.
fromtimestamp
(
walFile
.
mtime
)
info
=
f
"
{
walFile
.
pathFile
}
mt=
{
mt
}
line=
{
delTsLine
}
start=
{
walFile
.
startVer
}
snap=
{
self
.
snapVer
}
end=
{
walFile
.
endVer
}
"
info
=
f
"
{
walFile
.
pathFile
}
size=
{
walFile
.
fsize
}
mt=
{
mt
}
line=
{
delTsLine
}
start=
{
walFile
.
startVer
}
snap=
{
self
.
snapVer
}
end=
{
walFile
.
endVer
}
"
tdLog
.
info
(
info
)
if
walFile
.
mtime
<
delTs
and
self
.
canDelete
(
walFile
):
# wait a moment then check file exist
...
...
@@ -199,25 +208,16 @@ class VNode :
if
self
.
walSize
==
0
:
return
True
time
.
sleep
(
2
)
vnodeSize
=
self
.
getWalsSize
()
if
vnodeSize
<
self
.
walSize
:
tdLog
.
info
(
f
" wal size valid.
{
self
.
path
}
real =
{
vnodeSize
}
set =
{
self
.
walSize
}
"
)
# need over 20%
if
vnodeSize
<
self
.
walSize
*
1.2
:
tdLog
.
info
(
f
" wal size valid.
{
self
.
path
}
real =
{
vnodeSize
}
set =
{
self
.
walSize
}
need over 20%"
)
return
True
# check valid
tdLog
.
info
(
f
" wal size over set.
{
self
.
path
}
real =
{
vnodeSize
}
set =
{
self
.
walSize
}
"
)
for
walFile
in
self
.
walFiles
:
if
self
.
canDelete
(
walFile
):
# wait a moment then check file exist
time
.
sleep
(
1
)
if
os
.
path
.
exists
(
walFile
.
pathFile
):
tdLog
.
exit
(
f
" wal file size over .
\
\n
wal file =
{
walFile
.
pathFile
}
\
\n
snapVer =
{
self
.
snapVer
}
\
\n
real =
{
vnodeSize
}
bytes
\
\n
set =
{
self
.
walSize
}
bytes"
)
return
False
return
True
# check over
tdLog
.
exit
(
f
" wal size over set.
{
self
.
path
}
real =
{
vnodeSize
}
set =
{
self
.
walSize
}
"
)
return
False
# insert by async
...
...
tools/shell/src/shellWebsocket.c
浏览文件 @
f45d1c69
...
...
@@ -278,7 +278,7 @@ void shellRunSingleCommandWebsocketImp(char *command) {
}
if
(
code
==
TSDB_CODE_WS_SEND_TIMEOUT
||
code
==
TSDB_CODE_WS_RECV_TIMEOUT
)
{
fprintf
(
stderr
,
"Hint: use -
t
to increase the timeout in seconds
\n
"
);
fprintf
(
stderr
,
"Hint: use -
T
to increase the timeout in seconds
\n
"
);
}
else
if
(
code
==
TSDB_CODE_WS_INTERNAL_ERRO
||
code
==
TSDB_CODE_WS_CLOSED
)
{
shell
.
ws_conn
=
NULL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录