Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
aa60c861
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看板
提交
aa60c861
编写于
5月 17, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master' into feature/m2d
上级
34972fbf
d070bcd7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
32 addition
and
5 deletion
+32
-5
src/mnode/src/mnodeDb.c
src/mnode/src/mnodeDb.c
+1
-1
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+10
-2
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+5
-2
src/vnode/src/vnodeStatus.c
src/vnode/src/vnodeStatus.c
+3
-0
src/vnode/src/vnodeSync.c
src/vnode/src/vnodeSync.c
+11
-0
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+2
-0
未找到文件。
src/mnode/src/mnodeDb.c
浏览文件 @
aa60c861
...
...
@@ -389,7 +389,7 @@ static void mnodeSetDefaultDbCfg(SDbCfg *pCfg) {
if
(
pCfg
->
compression
<
0
)
pCfg
->
compression
=
tsCompression
;
if
(
pCfg
->
walLevel
<
0
)
pCfg
->
walLevel
=
tsWAL
;
if
(
pCfg
->
replications
<
0
)
pCfg
->
replications
=
tsReplications
;
if
(
pCfg
->
quorum
<
0
)
pCfg
->
quorum
=
tsQuorum
;
if
(
pCfg
->
quorum
<
0
)
pCfg
->
quorum
=
MIN
(
tsQuorum
,
pCfg
->
replications
)
;
if
(
pCfg
->
update
<
0
)
pCfg
->
update
=
tsUpdate
;
if
(
pCfg
->
cacheLastRow
<
0
)
pCfg
->
cacheLastRow
=
tsCacheLastRow
;
if
(
pCfg
->
dbType
<
0
)
pCfg
->
dbType
=
0
;
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
aa60c861
...
...
@@ -120,12 +120,14 @@ int32_t vnodeDrop(int32_t vgId) {
vDebug
(
"vgId:%d, failed to drop, vnode not find"
,
vgId
);
return
TSDB_CODE_VND_INVALID_VGROUP_ID
;
}
if
(
pVnode
->
dropped
)
{
vnodeRelease
(
pVnode
);
return
TSDB_CODE_SUCCESS
;
}
vInfo
(
"vgId:%d, vnode will be dropped, refCount:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
refCount
,
pVnode
);
pVnode
->
dropped
=
1
;
// remove from hash, so new messages wont be consumed
vnodeRemoveFromHash
(
pVnode
);
vnodeRelease
(
pVnode
);
vnodeCleanupInMWorker
(
pVnode
);
...
...
@@ -425,6 +427,10 @@ int32_t vnodeOpen(int32_t vgId) {
int32_t
vnodeClose
(
int32_t
vgId
)
{
SVnodeObj
*
pVnode
=
vnodeAcquire
(
vgId
);
if
(
pVnode
==
NULL
)
return
0
;
if
(
pVnode
->
dropped
)
{
vnodeRelease
(
pVnode
);
return
0
;
}
vDebug
(
"vgId:%d, vnode will be closed, pVnode:%p"
,
pVnode
->
vgId
,
pVnode
);
vnodeRemoveFromHash
(
pVnode
);
...
...
@@ -510,6 +516,8 @@ void vnodeCleanUp(SVnodeObj *pVnode) {
vnodeSetClosingStatus
(
pVnode
);
vnodeRemoveFromHash
(
pVnode
);
// stop replication module
if
(
pVnode
->
sync
>
0
)
{
int64_t
sync
=
pVnode
->
sync
;
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
aa60c861
...
...
@@ -117,14 +117,17 @@ static SVReadMsg *vnodeBuildVReadMsg(SVnodeObj *pVnode, void *pCont, int32_t con
}
int32_t
vnodeWriteToRQueue
(
void
*
vparam
,
void
*
pCont
,
int32_t
contLen
,
int8_t
qtype
,
void
*
rparam
)
{
SVnodeObj
*
pVnode
=
vparam
;
if
(
pVnode
->
dropped
)
{
return
TSDB_CODE_APP_NOT_READY
;
}
SVReadMsg
*
pRead
=
vnodeBuildVReadMsg
(
vparam
,
pCont
,
contLen
,
qtype
,
rparam
);
if
(
pRead
==
NULL
)
{
assert
(
terrno
!=
0
);
return
terrno
;
}
SVnodeObj
*
pVnode
=
vparam
;
int32_t
code
=
vnodeCheckRead
(
pVnode
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
taosFreeQitem
(
pRead
);
...
...
src/vnode/src/vnodeStatus.c
浏览文件 @
aa60c861
...
...
@@ -66,6 +66,9 @@ static bool vnodeSetClosingStatusImp(SVnodeObj* pVnode) {
}
bool
vnodeSetClosingStatus
(
SVnodeObj
*
pVnode
)
{
if
(
pVnode
->
status
==
TAOS_VN_STATUS_CLOSING
)
return
true
;
while
(
!
vnodeSetClosingStatusImp
(
pVnode
))
{
taosMsleep
(
1
);
}
...
...
src/vnode/src/vnodeSync.c
浏览文件 @
aa60c861
...
...
@@ -55,6 +55,11 @@ void vnodeNotifyRole(int32_t vgId, int8_t role) {
vTrace
(
"vgId:%d, vnode not found while notify role"
,
vgId
);
return
;
}
if
(
pVnode
->
dropped
)
{
vTrace
(
"vgId:%d, vnode dropped while notify role"
,
vgId
);
vnodeRelease
(
pVnode
);
return
;
}
vInfo
(
"vgId:%d, sync role changed from %s to %s"
,
pVnode
->
vgId
,
syncRole
[
pVnode
->
role
],
syncRole
[
role
]);
pVnode
->
role
=
role
;
...
...
@@ -75,6 +80,11 @@ void vnodeCtrlFlow(int32_t vgId, int32_t level) {
vTrace
(
"vgId:%d, vnode not found while flow ctrl"
,
vgId
);
return
;
}
if
(
pVnode
->
dropped
)
{
vTrace
(
"vgId:%d, vnode dropped while flow ctrl"
,
vgId
);
vnodeRelease
(
pVnode
);
return
;
}
if
(
pVnode
->
flowctrlLevel
!=
level
)
{
vDebug
(
"vgId:%d, set flowctrl level from %d to %d"
,
pVnode
->
vgId
,
pVnode
->
flowctrlLevel
,
level
);
...
...
@@ -129,6 +139,7 @@ int32_t vnodeWriteToCache(int32_t vgId, void *wparam, int32_t qtype, void *rpara
SVnodeObj
*
pVnode
=
vnodeAcquire
(
vgId
);
if
(
pVnode
==
NULL
)
{
vError
(
"vgId:%d, vnode not found while write to cache"
,
vgId
);
vnodeRelease
(
pVnode
);
return
TSDB_CODE_VND_INVALID_VGROUP_ID
;
}
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
aa60c861
...
...
@@ -386,4 +386,6 @@ void vnodeWaitWriteCompleted(SVnodeObj *pVnode) {
vTrace
(
"vgId:%d, queued wmsg num:%d"
,
pVnode
->
vgId
,
pVnode
->
queuedWMsg
);
taosMsleep
(
10
);
}
taosMsleep
(
900
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录