Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2f9c63ae
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
2f9c63ae
编写于
5月 19, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh(tq): update tb uid when droping table
上级
82b2ae41
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
6 deletion
+13
-6
source/dnode/mnode/impl/src/mndConsumer.c
source/dnode/mnode/impl/src/mndConsumer.c
+1
-1
source/dnode/vnode/src/inc/vnodeInt.h
source/dnode/vnode/src/inc/vnodeInt.h
+2
-2
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+2
-2
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+8
-1
未找到文件。
source/dnode/mnode/impl/src/mndConsumer.c
浏览文件 @
2f9c63ae
...
@@ -848,7 +848,7 @@ static int32_t mndRetrieveConsumer(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *
...
@@ -848,7 +848,7 @@ static int32_t mndRetrieveConsumer(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
numOfRows
,
(
const
char
*
)
cgroup
,
false
);
colDataAppend
(
pColInfo
,
numOfRows
,
(
const
char
*
)
cgroup
,
false
);
//
app
id
//
client
id
char
clientId
[
TSDB_CGROUP_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
char
clientId
[
TSDB_CGROUP_LEN
+
VARSTR_HEADER_SIZE
]
=
{
0
};
tstrncpy
(
varDataVal
(
clientId
),
pConsumer
->
clientId
,
TSDB_CGROUP_LEN
);
tstrncpy
(
varDataVal
(
clientId
),
pConsumer
->
clientId
,
TSDB_CGROUP_LEN
);
varDataSetLen
(
clientId
,
strlen
(
varDataVal
(
clientId
)));
varDataSetLen
(
clientId
,
strlen
(
varDataVal
(
clientId
)));
...
...
source/dnode/vnode/src/inc/vnodeInt.h
浏览文件 @
2f9c63ae
...
@@ -104,7 +104,7 @@ int tsdbOpen(SVnode* pVnode, STsdb** ppTsdb, const char* dir, STsdbKeep
...
@@ -104,7 +104,7 @@ int tsdbOpen(SVnode* pVnode, STsdb** ppTsdb, const char* dir, STsdbKeep
int
tsdbClose
(
STsdb
**
pTsdb
);
int
tsdbClose
(
STsdb
**
pTsdb
);
int
tsdbBegin
(
STsdb
*
pTsdb
);
int
tsdbBegin
(
STsdb
*
pTsdb
);
int
tsdbCommit
(
STsdb
*
pTsdb
);
int
tsdbCommit
(
STsdb
*
pTsdb
);
int
tsdbScanAndConvertSubmitMsg
(
STsdb
*
pTsdb
,
const
SSubmitReq
*
pMsg
);
int
tsdbScanAndConvertSubmitMsg
(
STsdb
*
pTsdb
,
const
SSubmitReq
*
pMsg
);
int
tsdbInsertData
(
STsdb
*
pTsdb
,
int64_t
version
,
SSubmitReq
*
pMsg
,
SSubmitRsp
*
pRsp
);
int
tsdbInsertData
(
STsdb
*
pTsdb
,
int64_t
version
,
SSubmitReq
*
pMsg
,
SSubmitRsp
*
pRsp
);
int
tsdbInsertTableData
(
STsdb
*
pTsdb
,
SSubmitMsgIter
*
pMsgIter
,
SSubmitBlk
*
pBlock
,
SSubmitBlkRsp
*
pRsp
);
int
tsdbInsertTableData
(
STsdb
*
pTsdb
,
SSubmitMsgIter
*
pMsgIter
,
SSubmitBlk
*
pBlock
,
SSubmitBlkRsp
*
pRsp
);
tsdbReaderT
*
tsdbQueryTables
(
SVnode
*
pVnode
,
SQueryTableDataCond
*
pCond
,
STableGroupInfo
*
groupList
,
uint64_t
qId
,
tsdbReaderT
*
tsdbQueryTables
(
SVnode
*
pVnode
,
SQueryTableDataCond
*
pCond
,
STableGroupInfo
*
groupList
,
uint64_t
qId
,
...
@@ -118,7 +118,7 @@ STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal);
...
@@ -118,7 +118,7 @@ STQ* tqOpen(const char* path, SVnode* pVnode, SWal* pWal);
void
tqClose
(
STQ
*
);
void
tqClose
(
STQ
*
);
int
tqPushMsg
(
STQ
*
,
void
*
msg
,
int32_t
msgLen
,
tmsg_t
msgType
,
int64_t
ver
);
int
tqPushMsg
(
STQ
*
,
void
*
msg
,
int32_t
msgLen
,
tmsg_t
msgType
,
int64_t
ver
);
int
tqCommit
(
STQ
*
);
int
tqCommit
(
STQ
*
);
int32_t
tqUpdateTbUidList
(
STQ
*
pTq
,
const
SArray
*
tbUidList
);
int32_t
tqUpdateTbUidList
(
STQ
*
pTq
,
const
SArray
*
tbUidList
,
bool
isAdd
);
int32_t
tqProcessVgChangeReq
(
STQ
*
pTq
,
char
*
msg
,
int32_t
msgLen
);
int32_t
tqProcessVgChangeReq
(
STQ
*
pTq
,
char
*
msg
,
int32_t
msgLen
);
int32_t
tqProcessVgDeleteReq
(
STQ
*
pTq
,
char
*
msg
,
int32_t
msgLen
);
int32_t
tqProcessVgDeleteReq
(
STQ
*
pTq
,
char
*
msg
,
int32_t
msgLen
);
int32_t
tqProcessTaskExec
(
STQ
*
pTq
,
char
*
msg
,
int32_t
msgLen
,
int32_t
workerId
);
int32_t
tqProcessTaskExec
(
STQ
*
pTq
,
char
*
msg
,
int32_t
msgLen
,
int32_t
workerId
);
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
2f9c63ae
...
@@ -104,7 +104,7 @@ static void tdSRowDemo() {
...
@@ -104,7 +104,7 @@ static void tdSRowDemo() {
taosMemoryFree
(
pTSChema
);
taosMemoryFree
(
pTSChema
);
}
}
int32_t
tqUpdateTbUidList
(
STQ
*
pTq
,
const
SArray
*
tbUidList
)
{
int32_t
tqUpdateTbUidList
(
STQ
*
pTq
,
const
SArray
*
tbUidList
,
bool
isAdd
)
{
void
*
pIter
=
NULL
;
void
*
pIter
=
NULL
;
STqExec
*
pExec
=
NULL
;
STqExec
*
pExec
=
NULL
;
while
(
1
)
{
while
(
1
)
{
...
@@ -113,7 +113,7 @@ int32_t tqUpdateTbUidList(STQ* pTq, const SArray* tbUidList) {
...
@@ -113,7 +113,7 @@ int32_t tqUpdateTbUidList(STQ* pTq, const SArray* tbUidList) {
pExec
=
(
STqExec
*
)
pIter
;
pExec
=
(
STqExec
*
)
pIter
;
if
(
pExec
->
subType
==
TOPIC_SUB_TYPE__DB
)
continue
;
if
(
pExec
->
subType
==
TOPIC_SUB_TYPE__DB
)
continue
;
for
(
int32_t
i
=
0
;
i
<
5
;
i
++
)
{
for
(
int32_t
i
=
0
;
i
<
5
;
i
++
)
{
int32_t
code
=
qUpdateQualifiedTableId
(
pExec
->
task
[
i
],
tbUidList
,
true
);
int32_t
code
=
qUpdateQualifiedTableId
(
pExec
->
task
[
i
],
tbUidList
,
isAdd
);
ASSERT
(
code
==
0
);
ASSERT
(
code
==
0
);
}
}
}
}
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
2f9c63ae
...
@@ -386,7 +386,7 @@ static int vnodeProcessCreateTbReq(SVnode *pVnode, int64_t version, void *pReq,
...
@@ -386,7 +386,7 @@ static int vnodeProcessCreateTbReq(SVnode *pVnode, int64_t version, void *pReq,
tDecoderClear
(
&
decoder
);
tDecoderClear
(
&
decoder
);
tqUpdateTbUidList
(
pVnode
->
pTq
,
tbUids
);
tqUpdateTbUidList
(
pVnode
->
pTq
,
tbUids
,
true
);
tdUpdateTbUidList
(
pVnode
->
pSma
,
pStore
);
tdUpdateTbUidList
(
pVnode
->
pSma
,
pStore
);
tdUidStoreFree
(
pStore
);
tdUidStoreFree
(
pStore
);
...
@@ -517,6 +517,7 @@ static int vnodeProcessDropTbReq(SVnode *pVnode, int64_t version, void *pReq, in
...
@@ -517,6 +517,7 @@ static int vnodeProcessDropTbReq(SVnode *pVnode, int64_t version, void *pReq, in
SDecoder
decoder
=
{
0
};
SDecoder
decoder
=
{
0
};
SEncoder
encoder
=
{
0
};
SEncoder
encoder
=
{
0
};
int
ret
;
int
ret
;
SArray
*
tbUids
;
pRsp
->
msgType
=
TDMT_VND_DROP_TABLE_RSP
;
pRsp
->
msgType
=
TDMT_VND_DROP_TABLE_RSP
;
pRsp
->
pCont
=
NULL
;
pRsp
->
pCont
=
NULL
;
...
@@ -533,7 +534,10 @@ static int vnodeProcessDropTbReq(SVnode *pVnode, int64_t version, void *pReq, in
...
@@ -533,7 +534,10 @@ static int vnodeProcessDropTbReq(SVnode *pVnode, int64_t version, void *pReq, in
}
}
// process req
// process req
tbUids
=
taosArrayInit
(
req
.
nReqs
,
sizeof
(
int64_t
));
rsp
.
pArray
=
taosArrayInit
(
req
.
nReqs
,
sizeof
(
SVDropTbRsp
));
rsp
.
pArray
=
taosArrayInit
(
req
.
nReqs
,
sizeof
(
SVDropTbRsp
));
if
(
tbUids
==
NULL
||
rsp
.
pArray
==
NULL
)
goto
_exit
;
for
(
int
iReq
=
0
;
iReq
<
req
.
nReqs
;
iReq
++
)
{
for
(
int
iReq
=
0
;
iReq
<
req
.
nReqs
;
iReq
++
)
{
SVDropTbReq
*
pDropTbReq
=
req
.
pReqs
+
iReq
;
SVDropTbReq
*
pDropTbReq
=
req
.
pReqs
+
iReq
;
SVDropTbRsp
dropTbRsp
=
{
0
};
SVDropTbRsp
dropTbRsp
=
{
0
};
...
@@ -553,7 +557,10 @@ static int vnodeProcessDropTbReq(SVnode *pVnode, int64_t version, void *pReq, in
...
@@ -553,7 +557,10 @@ static int vnodeProcessDropTbReq(SVnode *pVnode, int64_t version, void *pReq, in
taosArrayPush
(
rsp
.
pArray
,
&
dropTbRsp
);
taosArrayPush
(
rsp
.
pArray
,
&
dropTbRsp
);
}
}
tqUpdateTbUidList
(
pVnode
->
pTq
,
tbUids
,
false
);
_exit:
_exit:
taosArrayDestroy
(
tbUids
);
tDecoderClear
(
&
decoder
);
tDecoderClear
(
&
decoder
);
tEncodeSize
(
tEncodeSVDropTbBatchRsp
,
&
rsp
,
pRsp
->
contLen
,
ret
);
tEncodeSize
(
tEncodeSVDropTbBatchRsp
,
&
rsp
,
pRsp
->
contLen
,
ret
);
pRsp
->
pCont
=
rpcMallocCont
(
pRsp
->
contLen
);
pRsp
->
pCont
=
rpcMallocCont
(
pRsp
->
contLen
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录