Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b345312f
T
TDengine
项目概览
taosdata
/
TDengine
12 个月 前同步成功
通知
1180
Star
22014
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b345312f
编写于
4月 25, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-147]
上级
f62e4b95
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
22 addition
and
6 deletion
+22
-6
src/inc/taosmsg.h
src/inc/taosmsg.h
+0
-1
src/mnode/src/mgmtTable.c
src/mnode/src/mgmtTable.c
+20
-2
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+2
-3
未找到文件。
src/inc/taosmsg.h
浏览文件 @
b345312f
...
@@ -345,7 +345,6 @@ typedef struct {
...
@@ -345,7 +345,6 @@ typedef struct {
}
SMDDropTableMsg
;
}
SMDDropTableMsg
;
typedef
struct
{
typedef
struct
{
int32_t
contLen
;
int32_t
vgId
;
int32_t
vgId
;
int64_t
uid
;
int64_t
uid
;
char
tableId
[
TSDB_TABLE_ID_LEN
+
1
];
char
tableId
[
TSDB_TABLE_ID_LEN
+
1
];
...
...
src/mnode/src/mgmtTable.c
浏览文件 @
b345312f
...
@@ -756,8 +756,26 @@ static void mgmtProcessCreateSuperTableMsg(SQueuedMsg *pMsg) {
...
@@ -756,8 +756,26 @@ static void mgmtProcessCreateSuperTableMsg(SQueuedMsg *pMsg) {
static
void
mgmtProcessDropSuperTableMsg
(
SQueuedMsg
*
pMsg
)
{
static
void
mgmtProcessDropSuperTableMsg
(
SQueuedMsg
*
pMsg
)
{
SSuperTableObj
*
pStable
=
(
SSuperTableObj
*
)
pMsg
->
pTable
;
SSuperTableObj
*
pStable
=
(
SSuperTableObj
*
)
pMsg
->
pTable
;
if
(
pStable
->
numOfTables
!=
0
)
{
if
(
pStable
->
numOfTables
!=
0
)
{
mError
(
"stable:%s, numOfTables:%d not 0"
,
pStable
->
info
.
tableId
,
pStable
->
numOfTables
);
mgmtDropAllChildTablesInStable
(
pStable
);
mgmtSendSimpleResp
(
pMsg
->
thandle
,
TSDB_CODE_OTHERS
);
for
(
int32_t
vg
=
0
;
vg
<
pTable
->
vgLen
;
++
vg
)
{
int32_t
vgId
=
pTable
->
vgList
[
vg
];
if
(
vgId
==
0
)
break
;
SMDDropSTableMsg
*
pDrop
=
rpcMalloc
(
sizeof
(
SMDDropSTableMsg
));
pDrop
->
vgId
=
htonl
(
vgId
);
pDrop
->
uid
=
htobe64
(
pStable
->
uid
);
mgmtExtractTableName
(
pStable
->
info
.
tableId
,
pDrop
->
tableId
);
SVgObj
*
pVgroup
=
mgmtGetVgroup
(
vgId
);
if
(
pVgroup
!=
NULL
)
{
SRpcIpSet
ipSet
=
mgmtGetIpSetFromVgroup
(
pVgroup
);
SRpcMsg
rpcMsg
=
{.
pCont
=
pDrop
,
.
contLen
=
sizeof
(
SMDDropSTableMsg
),
.
msgType
=
TSDB_MSG_TYPE_MD_DROP_STABLE
};
mgmtSendMsgToDnode
(
&
ipSet
,
&
rpcMsg
);
mgmtDecVgroupRef
(
pVgroup
);
}
}
//mError("stable:%s, numOfTables:%d not 0", pStable->info.tableId, pStable->numOfTables);
//mgmtSendSimpleResp(pMsg->thandle, TSDB_CODE_OTHERS);
}
else
{
}
else
{
SSdbOper
oper
=
{
SSdbOper
oper
=
{
.
type
=
SDB_OPER_GLOBAL
,
.
type
=
SDB_OPER_GLOBAL
,
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
b345312f
...
@@ -224,11 +224,10 @@ static int32_t vnodeProcessDropStableMsg(SVnodeObj *pVnode, void *pCont, SRspRet
...
@@ -224,11 +224,10 @@ static int32_t vnodeProcessDropStableMsg(SVnodeObj *pVnode, void *pCont, SRspRet
int32_t
code
=
0
;
int32_t
code
=
0
;
dTrace
(
"pVnode:%p vgId:%d, stable:%s, start to drop"
,
pVnode
,
pVnode
->
vgId
,
pTable
->
tableId
);
dTrace
(
"pVnode:%p vgId:%d, stable:%s, start to drop"
,
pVnode
,
pVnode
->
vgId
,
pTable
->
tableId
);
// int64_t uid = htobe64(pTable->uid);
// TODO: drop stable in vvnode
// TODO: drop stable in vvnode
//int64_t uid = htobe64(pTable->uid);
//void *pTsdb = dnodeGetVnodeTsdb(pMsg->pVnode);
//void *pTsdb = dnodeGetVnodeTsdb(pMsg->pVnode);
//rpcRsp.code = tsdbDrop
S
Table(pTsdb, pTable->uid);
//rpcRsp.code = tsdbDropTable(pTsdb, pTable->uid);
code
=
TSDB_CODE_SUCCESS
;
code
=
TSDB_CODE_SUCCESS
;
dTrace
(
"pVnode:%p vgId:%d, stable:%s, drop stable result:%x"
,
pVnode
,
pTable
->
tableId
,
code
);
dTrace
(
"pVnode:%p vgId:%d, stable:%s, drop stable result:%x"
,
pVnode
,
pTable
->
tableId
,
code
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录