Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
~笨蛋陪你哭
TDengine
提交
681c314b
T
TDengine
项目概览
~笨蛋陪你哭
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
681c314b
编写于
3月 18, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-3355
上级
fdc0febb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
18 deletion
+14
-18
src/mnode/inc/mnodeVgroup.h
src/mnode/inc/mnodeVgroup.h
+1
-1
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+11
-14
src/mnode/src/mnodeVgroup.c
src/mnode/src/mnodeVgroup.c
+2
-2
src/util/src/tidpool.c
src/util/src/tidpool.c
+0
-1
未找到文件。
src/mnode/inc/mnodeVgroup.h
浏览文件 @
681c314b
...
...
@@ -44,7 +44,7 @@ void mnodeDropVgroup(SVgObj *pVgroup, void *ahandle);
void
mnodeAlterVgroup
(
SVgObj
*
pVgroup
,
void
*
ahandle
);
int32_t
mnodeGetAvailableVgroup
(
struct
SMnodeMsg
*
pMsg
,
SVgObj
**
pVgroup
,
int32_t
*
sid
);
int32_t
mnodeAddTableIntoVgroup
(
SVgObj
*
pVgroup
,
SCTableObj
*
pTable
);
int32_t
mnodeAddTableIntoVgroup
(
SVgObj
*
pVgroup
,
SCTableObj
*
pTable
,
bool
needCheck
);
void
mnodeRemoveTableFromVgroup
(
SVgObj
*
pVgroup
,
SCTableObj
*
pTable
);
void
mnodeSendDropVnodeMsg
(
int32_t
vgId
,
SRpcEpSet
*
epSet
,
void
*
ahandle
);
void
mnodeSendCreateVgroupMsg
(
SVgObj
*
pVgroup
,
void
*
ahandle
);
...
...
src/mnode/src/mnodeTable.c
浏览文件 @
681c314b
...
...
@@ -152,7 +152,7 @@ static int32_t mnodeChildTableActionInsert(SSdbRow *pRow) {
if
(
pDb
)
mnodeAddTableIntoDb
(
pDb
);
if
(
pVgroup
)
{
if
(
mnodeAddTableIntoVgroup
(
pVgroup
,
pTable
)
!=
0
)
{
if
(
mnodeAddTableIntoVgroup
(
pVgroup
,
pTable
,
pRow
->
pMsg
==
NULL
)
!=
0
)
{
mError
(
"table:%s, vgId:%d tid:%d, failed to perform insert action, uid:%"
PRIu64
" suid:%"
PRIu64
,
pTable
->
info
.
tableId
,
pTable
->
vgId
,
pTable
->
tid
,
pTable
->
uid
,
pTable
->
suid
);
code
=
-
1
;
...
...
@@ -1912,15 +1912,14 @@ static int32_t mnodeDoCreateChildTableCb(SMnodeMsg *pMsg, int32_t code) {
pMsg
->
rpcMsg
.
handle
);
if
(
pMsg
->
pBatchMasterMsg
)
{
++
pMsg
->
pBatchMasterMsg
->
successed
;
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
code
);
}
++
pMsg
->
pBatchMasterMsg
->
successed
;
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
code
);
}
mnodeDestroySubMsg
(
pMsg
);
mnodeDestroySubMsg
(
pMsg
);
return
TSDB_CODE_MND_ACTION_IN_PROGRESS
;
return
TSDB_CODE_MND_ACTION_IN_PROGRESS
;
}
dnodeSendRpcMWriteRsp
(
pMsg
,
TSDB_CODE_SUCCESS
);
...
...
@@ -1935,9 +1934,8 @@ static int32_t mnodeDoCreateChildTableCb(SMnodeMsg *pMsg, int32_t code) {
if
(
pMsg
->
pBatchMasterMsg
)
{
++
pMsg
->
pBatchMasterMsg
->
received
;
pMsg
->
pBatchMasterMsg
->
code
=
code
;
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
code
);
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
code
);
}
mnodeDestroySubMsg
(
pMsg
);
...
...
@@ -2686,9 +2684,8 @@ static void mnodeProcessCreateChildTableRsp(SRpcMsg *rpcMsg) {
if
(
pMsg
->
pBatchMasterMsg
)
{
++
pMsg
->
pBatchMasterMsg
->
successed
;
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
rpcMsg
->
code
);
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
rpcMsg
->
code
);
}
mnodeDestroySubMsg
(
pMsg
);
...
...
src/mnode/src/mnodeVgroup.c
浏览文件 @
681c314b
...
...
@@ -834,14 +834,14 @@ static int32_t mnodeRetrieveVgroups(SShowObj *pShow, char *data, int32_t rows, v
return
numOfRows
;
}
int32_t
mnodeAddTableIntoVgroup
(
SVgObj
*
pVgroup
,
SCTableObj
*
pTable
)
{
int32_t
mnodeAddTableIntoVgroup
(
SVgObj
*
pVgroup
,
SCTableObj
*
pTable
,
bool
needCheck
)
{
int32_t
idPoolSize
=
taosIdPoolMaxSize
(
pVgroup
->
idPool
);
if
(
pTable
->
tid
>
idPoolSize
)
{
mnodeAllocVgroupIdPool
(
pVgroup
);
}
if
(
pTable
->
tid
>=
1
)
{
if
(
taosIdPoolMarkStatus
(
pVgroup
->
idPool
,
pTable
->
tid
))
{
if
(
taosIdPoolMarkStatus
(
pVgroup
->
idPool
,
pTable
->
tid
)
||
!
needCheck
)
{
pVgroup
->
numOfTables
++
;
mTrace
(
"table:%s, vgId:%d tid:%d, mark tid used, uid:%"
PRIu64
,
pTable
->
info
.
tableId
,
pTable
->
vgId
,
pTable
->
tid
,
pTable
->
uid
);
...
...
src/util/src/tidpool.c
浏览文件 @
681c314b
...
...
@@ -124,7 +124,6 @@ bool taosIdPoolMarkStatus(void *handle, int id) {
ret
=
true
;
}
else
{
ret
=
false
;
uError
(
"pool:%p, id:%d is already used by other obj"
,
pIdPool
,
id
);
}
pthread_mutex_unlock
(
&
pIdPool
->
mutex
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录