Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
d19fb498
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看板
未验证
提交
d19fb498
编写于
8月 29, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
8月 29, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3288 from taosdata/feature/os
TD-1248 TD-1044
上级
70ff6014
e363c01d
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
19 addition
and
2 deletion
+19
-2
src/mnode/src/mnodeShow.c
src/mnode/src/mnodeShow.c
+1
-0
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+7
-0
src/mnode/src/mnodeVgroup.c
src/mnode/src/mnodeVgroup.c
+11
-2
未找到文件。
src/mnode/src/mnodeShow.c
浏览文件 @
d19fb498
...
@@ -313,6 +313,7 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) {
...
@@ -313,6 +313,7 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) {
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
code
=
TSDB_CODE_MND_DB_IN_DROPPING
;
code
=
TSDB_CODE_MND_DB_IN_DROPPING
;
mnodeDecDbRef
(
pDb
);
goto
connect_over
;
goto
connect_over
;
}
}
mnodeDecDbRef
(
pDb
);
mnodeDecDbRef
(
pDb
);
...
...
src/mnode/src/mnodeTable.c
浏览文件 @
d19fb498
...
@@ -294,6 +294,7 @@ static int32_t mnodeChildTableActionRestored() {
...
@@ -294,6 +294,7 @@ static int32_t mnodeChildTableActionRestored() {
SSdbOper
desc
=
{.
type
=
SDB_OPER_LOCAL
,
.
pObj
=
pTable
,
.
table
=
tsChildTableSdb
};
SSdbOper
desc
=
{.
type
=
SDB_OPER_LOCAL
,
.
pObj
=
pTable
,
.
table
=
tsChildTableSdb
};
sdbDeleteRow
(
&
desc
);
sdbDeleteRow
(
&
desc
);
mnodeDecTableRef
(
pTable
);
mnodeDecTableRef
(
pTable
);
mnodeDecDbRef
(
pDb
);
continue
;
continue
;
}
}
mnodeDecDbRef
(
pDb
);
mnodeDecDbRef
(
pDb
);
...
@@ -1259,6 +1260,7 @@ static int32_t mnodeGetShowSuperTableMeta(STableMetaMsg *pMeta, SShowObj *pShow,
...
@@ -1259,6 +1260,7 @@ static int32_t mnodeGetShowSuperTableMeta(STableMetaMsg *pMeta, SShowObj *pShow,
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mnodeDecDbRef
(
pDb
);
return
TSDB_CODE_MND_DB_IN_DROPPING
;
return
TSDB_CODE_MND_DB_IN_DROPPING
;
}
}
...
@@ -1323,6 +1325,7 @@ int32_t mnodeRetrieveShowSuperTables(SShowObj *pShow, char *data, int32_t rows,
...
@@ -1323,6 +1325,7 @@ int32_t mnodeRetrieveShowSuperTables(SShowObj *pShow, char *data, int32_t rows,
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mnodeDecDbRef
(
pDb
);
return
0
;
return
0
;
}
}
...
@@ -2495,6 +2498,7 @@ static int32_t mnodeGetShowTableMeta(STableMetaMsg *pMeta, SShowObj *pShow, void
...
@@ -2495,6 +2498,7 @@ static int32_t mnodeGetShowTableMeta(STableMetaMsg *pMeta, SShowObj *pShow, void
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mnodeDecDbRef
(
pDb
);
return
TSDB_CODE_MND_DB_IN_DROPPING
;
return
TSDB_CODE_MND_DB_IN_DROPPING
;
}
}
...
@@ -2548,6 +2552,7 @@ static int32_t mnodeRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows
...
@@ -2548,6 +2552,7 @@ static int32_t mnodeRetrieveShowTables(SShowObj *pShow, char *data, int32_t rows
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mnodeDecDbRef
(
pDb
);
return
0
;
return
0
;
}
}
...
@@ -2716,6 +2721,7 @@ static int32_t mnodeGetStreamTableMeta(STableMetaMsg *pMeta, SShowObj *pShow, vo
...
@@ -2716,6 +2721,7 @@ static int32_t mnodeGetStreamTableMeta(STableMetaMsg *pMeta, SShowObj *pShow, vo
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mnodeDecDbRef
(
pDb
);
return
TSDB_CODE_MND_DB_IN_DROPPING
;
return
TSDB_CODE_MND_DB_IN_DROPPING
;
}
}
...
@@ -2768,6 +2774,7 @@ static int32_t mnodeRetrieveStreamTables(SShowObj *pShow, char *data, int32_t ro
...
@@ -2768,6 +2774,7 @@ static int32_t mnodeRetrieveStreamTables(SShowObj *pShow, char *data, int32_t ro
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mnodeDecDbRef
(
pDb
);
return
0
;
return
0
;
}
}
...
...
src/mnode/src/mnodeVgroup.c
浏览文件 @
d19fb498
...
@@ -89,6 +89,7 @@ static int32_t mnodeVgroupActionInsert(SSdbOper *pOper) {
...
@@ -89,6 +89,7 @@ static int32_t mnodeVgroupActionInsert(SSdbOper *pOper) {
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"vgId:%d, db:%s status:%d, in dropping"
,
pVgroup
->
vgId
,
pDb
->
name
,
pDb
->
status
);
mError
(
"vgId:%d, db:%s status:%d, in dropping"
,
pVgroup
->
vgId
,
pDb
->
name
,
pDb
->
status
);
mnodeDecDbRef
(
pDb
);
return
TSDB_CODE_MND_DB_IN_DROPPING
;
return
TSDB_CODE_MND_DB_IN_DROPPING
;
}
}
...
@@ -617,6 +618,7 @@ static int32_t mnodeGetVgroupMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *p
...
@@ -617,6 +618,7 @@ static int32_t mnodeGetVgroupMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *p
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mnodeDecDbRef
(
pDb
);
return
TSDB_CODE_MND_DB_IN_DROPPING
;
return
TSDB_CODE_MND_DB_IN_DROPPING
;
}
}
...
@@ -708,6 +710,7 @@ static int32_t mnodeRetrieveVgroups(SShowObj *pShow, char *data, int32_t rows, v
...
@@ -708,6 +710,7 @@ static int32_t mnodeRetrieveVgroups(SShowObj *pShow, char *data, int32_t rows, v
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
if
(
pDb
->
status
!=
TSDB_DB_STATUS_READY
)
{
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mError
(
"db:%s, status:%d, in dropping"
,
pDb
->
name
,
pDb
->
status
);
mnodeDecDbRef
(
pDb
);
return
0
;
return
0
;
}
}
...
@@ -784,7 +787,10 @@ void mnodeAddTableIntoVgroup(SVgObj *pVgroup, SChildTableObj *pTable) {
...
@@ -784,7 +787,10 @@ void mnodeAddTableIntoVgroup(SVgObj *pVgroup, SChildTableObj *pTable) {
if
(
pTable
->
sid
>=
1
)
{
if
(
pTable
->
sid
>=
1
)
{
taosIdPoolMarkStatus
(
pVgroup
->
idPool
,
pTable
->
sid
);
taosIdPoolMarkStatus
(
pVgroup
->
idPool
,
pTable
->
sid
);
pVgroup
->
numOfTables
++
;
pVgroup
->
numOfTables
++
;
mnodeIncVgroupRef
(
pVgroup
);
// The create vgroup message may be received later than the create table message
// and the writing order in sdb is therefore uncertain
// which will cause the reference count of the vgroup to be incorrect when restarting
// mnodeIncVgroupRef(pVgroup);
}
}
}
}
...
@@ -792,7 +798,10 @@ void mnodeRemoveTableFromVgroup(SVgObj *pVgroup, SChildTableObj *pTable) {
...
@@ -792,7 +798,10 @@ void mnodeRemoveTableFromVgroup(SVgObj *pVgroup, SChildTableObj *pTable) {
if
(
pTable
->
sid
>=
1
)
{
if
(
pTable
->
sid
>=
1
)
{
taosFreeId
(
pVgroup
->
idPool
,
pTable
->
sid
);
taosFreeId
(
pVgroup
->
idPool
,
pTable
->
sid
);
pVgroup
->
numOfTables
--
;
pVgroup
->
numOfTables
--
;
mnodeDecVgroupRef
(
pVgroup
);
// The create vgroup message may be received later than the create table message
// and the writing order in sdb is therefore uncertain
// which will cause the reference count of the vgroup to be incorrect when restarting
// mnodeDecVgroupRef(pVgroup);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录