Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
41889340
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
41889340
编写于
3月 26, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature/qnode
上级
aa518a92
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
31 addition
and
8 deletion
+31
-8
include/util/tdef.h
include/util/tdef.h
+2
-0
source/dnode/mgmt/mnode/src/mmWorker.c
source/dnode/mgmt/mnode/src/mmWorker.c
+26
-1
source/dnode/mnode/impl/src/mndInfoSchema.c
source/dnode/mnode/impl/src/mndInfoSchema.c
+1
-0
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+1
-0
tests/script/tsim/db/error1.sim
tests/script/tsim/db/error1.sim
+1
-7
未找到文件。
include/util/tdef.h
浏览文件 @
41889340
...
...
@@ -109,6 +109,8 @@ extern const int32_t TYPE_BYTES[15];
#define TSDB_INS_TABLE_USER_USERS "user_users"
#define TSDB_INS_TABLE_VGROUPS "vgroups"
#define TSDB_INS_USER_STABLES_DBNAME_COLID 2
#define TSDB_TICK_PER_SECOND(precision) \
((int64_t)((precision) == TSDB_TIME_PRECISION_MILLI ? 1e3L \
: ((precision) == TSDB_TIME_PRECISION_MICRO ? 1e6L : 1e9L)))
...
...
source/dnode/mgmt/mnode/src/mmWorker.c
浏览文件 @
41889340
...
...
@@ -44,6 +44,30 @@ static void mmProcessQueue(SQueueInfo *pInfo, SNodeMsg *pMsg) {
taosFreeQitem
(
pMsg
);
}
static
void
mmProcessQueryQueue
(
SQueueInfo
*
pInfo
,
SNodeMsg
*
pMsg
)
{
SMnodeMgmt
*
pMgmt
=
pInfo
->
ahandle
;
dTrace
(
"msg:%p, will be processed in mnode queue"
,
pMsg
);
SRpcMsg
*
pRpc
=
&
pMsg
->
rpcMsg
;
int32_t
code
=
-
1
;
pMsg
->
pNode
=
pMgmt
->
pMnode
;
code
=
mndProcessMsg
(
pMsg
);
if
(
pRpc
->
msgType
&
1U
)
{
if
(
pRpc
->
handle
==
NULL
)
return
;
if
(
code
!=
0
)
{
SRpcMsg
rsp
=
{.
handle
=
pRpc
->
handle
,
.
code
=
code
,
.
ahandle
=
pRpc
->
ahandle
};
dndSendRsp
(
pMgmt
->
pWrapper
,
&
rsp
);
}
}
dTrace
(
"msg:%p, is freed, result:0x%04x:%s"
,
pMsg
,
code
&
0XFFFF
,
tstrerror
(
code
));
rpcFreeCont
(
pRpc
->
pCont
);
taosFreeQitem
(
pMsg
);
}
static
int32_t
mmPutMsgToWorker
(
SMnodeMgmt
*
pMgmt
,
SSingleWorker
*
pWorker
,
SNodeMsg
*
pMsg
)
{
dTrace
(
"msg:%p, put into worker %s"
,
pMsg
,
pWorker
->
name
);
return
taosWriteQitem
(
pWorker
->
queue
,
pMsg
);
...
...
@@ -102,8 +126,9 @@ int32_t mmPutMsgToQueryQueue(SMgmtWrapper *pWrapper, SRpcMsg *pRpc) {
int32_t
mmStartWorker
(
SMnodeMgmt
*
pMgmt
)
{
SSingleWorkerCfg
cfg
=
{.
minNum
=
0
,
.
maxNum
=
1
,
.
name
=
"mnode-read"
,
.
fp
=
(
FItem
)
mmProcessQueue
,
.
param
=
pMgmt
};
SSingleWorkerCfg
queryCfg
=
{.
minNum
=
0
,
.
maxNum
=
1
,
.
name
=
"mnode-query"
,
.
fp
=
(
FItem
)
mmProcessQueryQueue
,
.
param
=
pMgmt
};
if
(
tSingleWorkerInit
(
&
pMgmt
->
queryWorker
,
&
c
fg
)
!=
0
)
{
if
(
tSingleWorkerInit
(
&
pMgmt
->
queryWorker
,
&
queryC
fg
)
!=
0
)
{
dError
(
"failed to start mnode-query worker since %s"
,
terrstr
());
return
-
1
;
}
...
...
source/dnode/mnode/impl/src/mndInfoSchema.c
浏览文件 @
41889340
...
...
@@ -19,6 +19,7 @@
#define SYSTABLE_SCH_TABLE_NAME_LEN ((TSDB_TABLE_NAME_LEN - 1) + VARSTR_HEADER_SIZE)
#define SYSTABLE_SCH_DB_NAME_LEN ((TSDB_DB_NAME_LEN - 1) + VARSTR_HEADER_SIZE)
//!!!! Note: only APPEND columns in below tables, NO insert !!!!
static
const
SInfosTableSchema
dnodesSchema
[]
=
{{.
name
=
"id"
,
.
bytes
=
2
,
.
type
=
TSDB_DATA_TYPE_SMALLINT
},
{.
name
=
"endpoint"
,
.
bytes
=
TSDB_EP_LEN
+
VARSTR_HEADER_SIZE
,
.
type
=
TSDB_DATA_TYPE_BINARY
},
{.
name
=
"vnodes"
,
.
bytes
=
2
,
.
type
=
TSDB_DATA_TYPE_SMALLINT
},
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
41889340
...
...
@@ -5612,6 +5612,7 @@ static SSDataBlock* doSysTableScan(SOperatorInfo *pOperator, bool* newgroup) {
pInfo
->
req
.
type
=
pInfo
->
type
;
strncpy
(
pInfo
->
req
.
tb
,
tNameGetTableName
(
&
pInfo
->
name
),
tListLen
(
pInfo
->
req
.
tb
));
getFullDBNameFromCondition
(
pInfo
->
pCondition
,
pInfo
->
req
.
db
));
int32_t
contLen
=
tSerializeSRetrieveTableReq
(
NULL
,
0
,
&
pInfo
->
req
);
char
*
buf1
=
calloc
(
1
,
contLen
);
...
...
tests/script/tsim/db/error1.sim
浏览文件 @
41889340
...
...
@@ -16,17 +16,11 @@ create1:
return -1
endi
# todo remove
sql create database useless_db
sql show dnodes
if $data4_2 != ready then
goto create1
endi
# todo remove
sql drop database useless_db
print ========== stop dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGKILL
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录