Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8943fd2f
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看板
提交
8943fd2f
编写于
9月 27, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: log optimization for data migrate
上级
70f2c685
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
16 deletion
+18
-16
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
+6
-6
source/dnode/vnode/src/tsdb/tsdbRetention.c
source/dnode/vnode/src/tsdb/tsdbRetention.c
+7
-5
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+5
-5
未找到文件。
source/dnode/vnode/src/tsdb/tsdbReaderWriter.c
浏览文件 @
8943fd2f
...
...
@@ -630,8 +630,8 @@ static int64_t tsdbFSendFile(STsdb *pTsdb, TdFilePtr pOutFD, TdFilePtr pInFD, in
while
((
offset
+
nBytes
)
<
size
)
{
if
(
atomic_load_8
(
&
pTsdb
->
trimHdl
.
commitInWait
)
==
1
)
{
tsdb
Info
(
"vgId:%d sendFile without limit since conflicts, fSize:%"
PRIi64
", maxSpeed:%"
PRIi64
,
TD_VID
(
pTsdb
->
pVnode
),
size
,
speed
);
tsdb
Debug
(
"vgId:%d sendFile without limit since conflicts, fSize:%"
PRIi64
", maxSpeed:%"
PRIi64
,
TD_VID
(
pTsdb
->
pVnode
),
size
,
speed
);
goto
_send_remain
;
}
startMs
=
taosGetTimestampMs
();
...
...
@@ -649,8 +649,8 @@ static int64_t tsdbFSendFile(STsdb *pTsdb, TdFilePtr pOutFD, TdFilePtr pInFD, in
}
if
(
nSleep
>
0
)
{
taosMsleep
(
nSleep
);
tsdb
Info
(
"vgId:%d sendFile and msleep:%"
PRIi64
", fSize:%"
PRIi64
", tBytes:%"
PRIi64
" maxSpeed:%"
PRIi64
,
TD_VID
(
pTsdb
->
pVnode
),
nSleep
,
size
,
tBytes
,
speed
);
tsdb
Debug
(
"vgId:%d sendFile and msleep:%"
PRIi64
", fSize:%"
PRIi64
", tBytes:%"
PRIi64
" maxSpeed:%"
PRIi64
,
TD_VID
(
pTsdb
->
pVnode
),
nSleep
,
size
,
tBytes
,
speed
);
}
}
...
...
@@ -660,8 +660,8 @@ _send_remain:
return
nBytes
;
}
tBytes
+=
nBytes
;
tsdb
Info
(
"vgId:%d sendFile remain, fSize:%"
PRIi64
", tBytes:%"
PRIi64
" maxSpeed:%"
PRIi64
,
TD_VID
(
pTsdb
->
pVnode
),
size
,
tBytes
,
speed
);
tsdb
Debug
(
"vgId:%d sendFile remain, fSize:%"
PRIi64
", tBytes:%"
PRIi64
" maxSpeed:%"
PRIi64
,
TD_VID
(
pTsdb
->
pVnode
),
size
,
tBytes
,
speed
);
}
return
tBytes
;
}
...
...
source/dnode/vnode/src/tsdb/tsdbRetention.c
浏览文件 @
8943fd2f
...
...
@@ -125,7 +125,7 @@ _retention_loop:
fSize
+=
pSet
->
aSttF
[
iStt
]
->
size
;
}
if
(
fSize
/
speed
>
MIGRATE_MIN_COST
)
{
tsdb
Info
(
"vgId:%d migrate loop[%d] with maxFid:%d"
,
TD_VID
(
pTsdb
->
pVnode
),
nBatch
,
maxFid
);
tsdb
Debug
(
"vgId:%d migrate loop[%d] with maxFid:%d"
,
TD_VID
(
pTsdb
->
pVnode
),
nBatch
,
maxFid
);
break
;
}
}
...
...
@@ -174,8 +174,8 @@ _commit_conflict_check:
if
(
pSet
->
fid
>
maxFid
)
break
;
tsdb
Info
(
"vgId:%d migrate loop[%d] with maxFid:%d, fid:%d, did:%d, level:%d, expLevel:%d"
,
TD_VID
(
pTsdb
->
pVnode
),
nBatch
,
maxFid
,
pSet
->
fid
,
pSet
->
diskId
.
id
,
pSet
->
diskId
.
level
,
expLevel
);
tsdb
Debug
(
"vgId:%d migrate loop[%d] with maxFid:%d, fid:%d, did:%d, level:%d, expLevel:%d"
,
TD_VID
(
pTsdb
->
pVnode
),
nBatch
,
maxFid
,
pSet
->
fid
,
pSet
->
diskId
.
id
,
pSet
->
diskId
.
level
,
expLevel
);
if
(
expLevel
<
0
)
{
SET_DFSET_EXPIRED
(
pSet
);
...
...
@@ -273,11 +273,13 @@ int32_t tsdbDoRetention(STsdb *pTsdb, int64_t now, int64_t maxSpeed) {
_exit:
pTsdb
->
trimHdl
.
maxRetentFid
=
INT32_MIN
;
if
(
code
!=
0
)
{
tsdbError
(
"vgId:%d, tsdb do retention %d failed since %s"
,
TD_VID
(
pTsdb
->
pVnode
),
retention
,
tstrerror
(
code
));
tsdbError
(
"vgId:%d, tsdb do retention %d failed since %s, time:%"
PRIi64
", max speed:%"
PRIi64
,
TD_VID
(
pTsdb
->
pVnode
),
retention
,
tstrerror
(
code
),
now
,
maxSpeed
);
ASSERT
(
0
);
// tsdbFSRollback(pTsdb->pFS);
}
else
{
tsdbInfo
(
"vgId:%d, tsdb do retention %d succeed"
,
TD_VID
(
pTsdb
->
pVnode
),
retention
);
tsdbInfo
(
"vgId:%d, tsdb do retention %d succeed, time:%"
PRIi64
"max speed:%"
PRIi64
,
TD_VID
(
pTsdb
->
pVnode
),
retention
,
now
,
maxSpeed
);
}
return
code
;
}
\ No newline at end of file
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
8943fd2f
...
...
@@ -425,14 +425,14 @@ void *vnodeProcessTrimReqFunc(void *param) {
_exit:
oldVal
=
atomic_val_compare_exchange_8
(
&
pVnode
->
trimDbH
.
state
,
1
,
0
);
ASSERT
(
oldVal
==
1
);
taosMemoryFree
(
pReq
);
if
(
code
)
{
vError
(
"vgId:%d, trim vnode thread failed since %s, time:%"
PRIi64
,
TD_VID
(
pVnode
),
tstrerror
(
c
ode
),
pReq
->
trimReq
.
timestamp
);
vError
(
"vgId:%d, trim vnode thread failed since %s, time:%"
PRIi64
", max speed:%"
PRIi64
,
TD_VID
(
pVn
ode
),
tstrerror
(
code
),
pReq
->
trimReq
.
timestamp
,
pReq
->
trimReq
.
maxSpeed
);
}
else
{
vInfo
(
"vgId:%d, trim vnode thread finished, time:%"
PRIi64
,
TD_VID
(
pVnode
),
pReq
->
trimReq
.
timestamp
);
vInfo
(
"vgId:%d, trim vnode thread finish, time:%"
PRIi64
", max speed:%"
PRIi64
,
TD_VID
(
pVnode
),
pReq
->
trimReq
.
timestamp
,
pReq
->
trimReq
.
maxSpeed
);
}
taosMemoryFree
(
pReq
);
return
NULL
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录