Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
780e3e1b
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,发现更多精彩内容 >>
提交
780e3e1b
编写于
5月 28, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-335] fix bug while auto create table
上级
30e867da
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
9 deletion
+16
-9
src/dnode/src/dnodeMPeer.c
src/dnode/src/dnodeMPeer.c
+5
-5
src/dnode/src/dnodeMRead.c
src/dnode/src/dnodeMRead.c
+5
-0
src/dnode/src/dnodeMWrite.c
src/dnode/src/dnodeMWrite.c
+4
-0
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+1
-0
src/mnode/src/mnodeVgroup.c
src/mnode/src/mnodeVgroup.c
+1
-4
未找到文件。
src/dnode/src/dnodeMPeer.c
浏览文件 @
780e3e1b
...
...
@@ -75,7 +75,7 @@ void dnodeCleanupMnodePeer() {
}
}
dPrint
(
"dnode m
mgmt
is closed"
);
dPrint
(
"dnode m
peer
is closed"
);
}
int32_t
dnodeAllocateMnodePqueue
()
{
...
...
@@ -93,14 +93,14 @@ int32_t dnodeAllocateMnodePqueue() {
pthread_attr_setdetachstate
(
&
thAttr
,
PTHREAD_CREATE_JOINABLE
);
if
(
pthread_create
(
&
pWorker
->
thread
,
&
thAttr
,
dnodeProcessMnodePeerQueue
,
pWorker
)
!=
0
)
{
dError
(
"failed to create thread to process m
mgmt
queue, reason:%s"
,
strerror
(
errno
));
dError
(
"failed to create thread to process m
peer
queue, reason:%s"
,
strerror
(
errno
));
}
pthread_attr_destroy
(
&
thAttr
);
dTrace
(
"dnode m
mgmt
worker:%d is launched, total:%d"
,
pWorker
->
workerId
,
tsMPeerPool
.
num
);
dTrace
(
"dnode m
peer
worker:%d is launched, total:%d"
,
pWorker
->
workerId
,
tsMPeerPool
.
num
);
}
dTrace
(
"dnode m
mgmt
queue:%p is allocated"
,
tsMPeerQueue
);
dTrace
(
"dnode m
peer
queue:%p is allocated"
,
tsMPeerQueue
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -150,7 +150,7 @@ static void *dnodeProcessMnodePeerQueue(void *param) {
break
;
}
dTrace
(
"
%p, msg:%s will be processed in mpeer queue"
,
pPeerMsg
->
rpcMsg
.
ahandle
,
taosMsg
[
pPeerMsg
->
rpcMsg
.
msgType
]);
dTrace
(
"
msg:%s will be processed in mpeer queue"
,
taosMsg
[
pPeerMsg
->
rpcMsg
.
msgType
]);
int32_t
code
=
mnodeProcessPeerReq
(
pPeerMsg
);
dnodeSendRpcMnodePeerRsp
(
pPeerMsg
,
code
);
}
...
...
src/dnode/src/dnodeMRead.c
浏览文件 @
780e3e1b
...
...
@@ -132,6 +132,11 @@ static void dnodeFreeMnodeReadMsg(SMnodeMsg *pRead) {
static
void
dnodeSendRpcMnodeReadRsp
(
SMnodeMsg
*
pRead
,
int32_t
code
)
{
if
(
code
==
TSDB_CODE_ACTION_IN_PROGRESS
)
return
;
if
(
code
==
TSDB_CODE_ACTION_NEED_REPROCESSED
)
{
// may be a auto create req, should put into write queue
dnodeReprocessMnodeWriteMsg
(
pRead
);
return
;
}
SRpcMsg
rpcRsp
=
{
.
handle
=
pRead
->
rpcMsg
.
handle
,
...
...
src/dnode/src/dnodeMWrite.c
浏览文件 @
780e3e1b
...
...
@@ -130,6 +130,10 @@ static void dnodeFreeMnodeWriteMsg(SMnodeMsg *pWrite) {
void
dnodeSendRpcMnodeWriteRsp
(
void
*
pRaw
,
int32_t
code
)
{
SMnodeMsg
*
pWrite
=
pRaw
;
if
(
code
==
TSDB_CODE_ACTION_IN_PROGRESS
)
return
;
if
(
code
==
TSDB_CODE_ACTION_NEED_REPROCESSED
)
{
dnodeReprocessMnodeWriteMsg
(
pWrite
);
return
;
}
SRpcMsg
rpcRsp
=
{
.
handle
=
pWrite
->
rpcMsg
.
handle
,
...
...
src/mnode/src/mnodeTable.c
浏览文件 @
780e3e1b
...
...
@@ -741,6 +741,7 @@ static int32_t mnodeProcessTableMetaMsg(SMnodeMsg *pMsg) {
mError
(
"table:%s, failed to get table meta, table not exist"
,
pInfo
->
tableId
);
return
TSDB_CODE_INVALID_TABLE
;
}
else
{
mTrace
(
"table:%s, failed to get table meta, start auto create table "
,
pInfo
->
tableId
);
return
mgmtAutoCreateChildTable
(
pMsg
);
}
}
else
{
...
...
src/mnode/src/mnodeVgroup.c
浏览文件 @
780e3e1b
...
...
@@ -307,7 +307,6 @@ int32_t mnodeCreateVgroup(SMnodeMsg *pMsg, SDbObj *pDb) {
if
(
balanceAllocVnodes
(
pVgroup
)
!=
0
)
{
mError
(
"db:%s, no enough dnode to alloc %d vnodes to vgroup"
,
pDb
->
name
,
pVgroup
->
numOfVnodes
);
free
(
pVgroup
);
mnodeCleanupMsg
(
pMsg
);
return
TSDB_CODE_NO_ENOUGH_DNODES
;
}
...
...
@@ -321,9 +320,7 @@ int32_t mnodeCreateVgroup(SMnodeMsg *pMsg, SDbObj *pDb) {
int32_t
code
=
sdbInsertRow
(
&
oper
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
tfree
(
pVgroup
);
code
=
TSDB_CODE_SDB_ERROR
;
mnodeCleanupMsg
(
pMsg
);
return
TSDB_CODE_SDB_ERROR
;
return
TSDB_CODE_SDB_ERROR
;
}
mPrint
(
"vgId:%d, is created in mnode, db:%s replica:%d"
,
pVgroup
->
vgId
,
pDb
->
name
,
pVgroup
->
numOfVnodes
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录