Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
bba1e0bc
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bba1e0bc
编写于
7月 15, 2020
作者:
陶建辉(Jeff)
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into hotfix/TD-919
上级
995682f0
cd12407c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
9 deletion
+21
-9
src/mnode/src/mnodeVgroup.c
src/mnode/src/mnodeVgroup.c
+21
-9
未找到文件。
src/mnode/src/mnodeVgroup.c
浏览文件 @
bba1e0bc
...
...
@@ -40,9 +40,18 @@
typedef
enum
{
TAOS_VG_STATUS_READY
,
TAOS_VG_STATUS_DROPPING
TAOS_VG_STATUS_DROPPING
,
TAOS_VG_STATUS_CREATING
,
TAOS_VG_STATUS_UPDATING
,
}
EVgroupStatus
;
char
*
vgroupStatus
[]
=
{
"ready"
,
"dropping"
,
"creating"
,
"updating"
};
static
void
*
tsVgroupSdb
=
NULL
;
static
int32_t
tsVgUpdateSize
=
0
;
...
...
@@ -84,6 +93,7 @@ static int32_t mnodeVgroupActionInsert(SSdbOper *pOper) {
}
pVgroup
->
pDb
=
pDb
;
pVgroup
->
status
=
TAOS_VG_STATUS_CREATING
;
pVgroup
->
accessState
=
TSDB_VN_ALL_ACCCESS
;
if
(
mnodeAllocVgroupIdPool
(
pVgroup
)
<
0
)
{
mError
(
"vgId:%d, failed to init idpool for vgroups"
,
pVgroup
->
vgId
);
...
...
@@ -273,15 +283,13 @@ void mnodeCheckUnCreatedVgroup(SDnodeObj *pDnode, SVnodeLoad *pVloads, int32_t o
pNextV
++
;
}
if
(
i
==
openVnodes
&&
pVgroup
->
status
==
TAOS_VG_STATUS_READY
)
{
SDbObj
*
pDb
=
pVgroup
->
pDb
;
if
(
pDb
->
cfgVersion
!=
0
)
{
mDebug
(
"vgId:%d, not exist in dnode:%d and cfgVersion is %d, send alter msg"
,
pVgroup
->
vgId
,
pDnode
->
dnodeId
,
pDb
->
cfgVersion
);
mnodeSendAlterVgroupMsg
(
pVgroup
);
if
(
i
==
openVnodes
)
{
if
(
pVgroup
->
status
==
TAOS_VG_STATUS_CREATING
||
pVgroup
->
status
==
TAOS_VG_STATUS_DROPPING
)
{
mDebug
(
"vgId:%d, not exist in dnode:%d and status is %s, do nothing"
,
pVgroup
->
vgId
,
pDnode
->
dnodeId
,
vgroupStatus
[
pVgroup
->
status
]);
}
else
{
mDebug
(
"vgId:%d, not exist in dnode:%d and
cfgVersion is %d
, send create msg"
,
pVgroup
->
vgId
,
pDnode
->
dnodeId
,
pDb
->
cfgVersion
);
mDebug
(
"vgId:%d, not exist in dnode:%d and
status is %s
, send create msg"
,
pVgroup
->
vgId
,
pDnode
->
dnodeId
,
vgroupStatus
[
pVgroup
->
status
]
);
mnodeSendCreateVgroupMsg
(
pVgroup
,
NULL
);
}
}
...
...
@@ -472,6 +480,10 @@ static int32_t mnodeCreateVgroupCb(SMnodeMsg *pMsg, int32_t code) {
SSdbOper
desc
=
{.
type
=
SDB_OPER_GLOBAL
,
.
pObj
=
pVgroup
,
.
table
=
tsVgroupSdb
};
sdbDeleteRow
(
&
desc
);
return
code
;
}
else
{
pVgroup
->
status
=
TAOS_VG_STATUS_READY
;
SSdbOper
desc
=
{.
type
=
SDB_OPER_GLOBAL
,
.
pObj
=
pVgroup
,
.
table
=
tsVgroupSdb
};
sdbUpdateRow
(
&
desc
);
}
mInfo
(
"app:%p:%p, vgId:%d, is created in mnode, db:%s replica:%d"
,
pMsg
->
rpcMsg
.
ahandle
,
pMsg
,
pVgroup
->
vgId
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录