Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fb27589c
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看板
提交
fb27589c
编写于
5月 04, 2020
作者:
J
jtao1735
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
first draft
上级
0d09f6c0
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
33 addition
and
33 deletion
+33
-33
src/client/src/tscServer.c
src/client/src/tscServer.c
+4
-4
src/common/src/tmessage.c
src/common/src/tmessage.c
+6
-6
src/dnode/src/dnodeRead.c
src/dnode/src/dnodeRead.c
+1
-1
src/dnode/src/dnodeShell.c
src/dnode/src/dnodeShell.c
+3
-3
src/inc/taosmsg.h
src/inc/taosmsg.h
+11
-11
src/mnode/src/mgmtShell.c
src/mnode/src/mgmtShell.c
+2
-2
src/rpc/src/rpcMain.c
src/rpc/src/rpcMain.c
+2
-2
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+4
-4
未找到文件。
src/client/src/tscServer.c
浏览文件 @
fb27589c
...
...
@@ -512,7 +512,7 @@ void tscKillSTableQuery(SSqlObj *pSql) {
tscTrace
(
"%p metric query is cancelled"
,
pSql
);
}
int
tscBuild
Retrieve
Msg
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
int
tscBuild
Fetch
Msg
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
char
*
pMsg
,
*
pStart
;
pStart
=
pSql
->
cmd
.
payload
+
tsRpcHeadSize
;
...
...
@@ -541,7 +541,7 @@ int tscBuildRetrieveMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
pRetrieveMsg
->
header
.
contLen
=
htonl
(
pSql
->
cmd
.
payloadLen
);
pSql
->
cmd
.
msgType
=
TSDB_MSG_TYPE_
RETRIEVE
;
pSql
->
cmd
.
msgType
=
TSDB_MSG_TYPE_
FETCH
;
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -1365,7 +1365,7 @@ int tscAlterDbMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
int
tscBuildRetrieveFromMgmtMsg
(
SSqlObj
*
pSql
,
SSqlInfo
*
pInfo
)
{
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
pCmd
->
msgType
=
TSDB_MSG_TYPE_RETRIEVE
;
pCmd
->
msgType
=
TSDB_MSG_TYPE_
CM_
RETRIEVE
;
pCmd
->
payloadLen
=
sizeof
(
SRetrieveTableMsg
);
if
(
TSDB_CODE_SUCCESS
!=
tscAllocPayload
(
pCmd
,
pCmd
->
payloadLen
))
{
...
...
@@ -2595,7 +2595,7 @@ int tscGetSTableVgroupInfo(SSqlObj *pSql, int32_t clauseIndex) {
void
tscInitMsgsFp
()
{
tscBuildMsg
[
TSDB_SQL_SELECT
]
=
tscBuildQueryMsg
;
tscBuildMsg
[
TSDB_SQL_INSERT
]
=
tscBuildSubmitMsg
;
tscBuildMsg
[
TSDB_SQL_FETCH
]
=
tscBuild
Retrieve
Msg
;
tscBuildMsg
[
TSDB_SQL_FETCH
]
=
tscBuild
Fetch
Msg
;
tscBuildMsg
[
TSDB_SQL_CREATE_DB
]
=
tscBuildCreateDbMsg
;
tscBuildMsg
[
TSDB_SQL_CREATE_USER
]
=
tscBuildUserMsg
;
...
...
src/common/src/tmessage.c
浏览文件 @
fb27589c
...
...
@@ -23,9 +23,9 @@ char *taosMsg[] = {
"query-rsp"
,
"retrieve"
,
"retrieve-rsp"
,
"create-table"
,
"create-table-rsp"
,
//10
"drop-table"
,
"drop-table-rsp"
,
"alter-table"
,
...
...
@@ -100,13 +100,13 @@ char *taosMsg[] = {
"kill-stream-rsp"
,
"kill-connection"
,
"kill-connectoin-rsp"
,
"config-dnode"
,
"config-dnode-rsp"
,
"retrieve"
,
"retrieve-rsp"
,
"heart-beat"
,
"heart-beat-rsp"
,
//8
0
"heart-beat-rsp"
,
//8
4
""
,
""
,
""
,
""
,
""
,
""
,
""
,
...
...
src/dnode/src/dnodeRead.c
浏览文件 @
fb27589c
...
...
@@ -95,7 +95,7 @@ void dnodeRead(SRpcMsg *pMsg) {
pHead
->
vgId
=
htonl
(
pHead
->
vgId
);
pHead
->
contLen
=
htonl
(
pHead
->
contLen
);
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_
RETRIEVE
)
{
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_
FETCH
)
{
pVnode
=
vnodeGetVnode
(
pHead
->
vgId
);
}
else
{
pVnode
=
vnodeAccquireVnode
(
pHead
->
vgId
);
...
...
src/dnode/src/dnodeShell.c
浏览文件 @
fb27589c
...
...
@@ -35,9 +35,9 @@ static int32_t tsDnodeQueryReqNum = 0;
static
int32_t
tsDnodeSubmitReqNum
=
0
;
int32_t
dnodeInitShell
()
{
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_SUBMIT
]
=
dnodeWrite
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_QUERY
]
=
dnodeRead
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_
RETRIEVE
]
=
dnodeRead
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_SUBMIT
]
=
dnodeWrite
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_QUERY
]
=
dnodeRead
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_
FETCH
]
=
dnodeRead
;
int32_t
numOfThreads
=
tsNumOfCores
*
tsNumOfThreadsPerCore
;
numOfThreads
=
(
int32_t
)
((
1
.
0
-
tsRatioOfQueryThreads
)
*
numOfThreads
/
2
.
0
);
...
...
src/inc/taosmsg.h
浏览文件 @
fb27589c
...
...
@@ -28,14 +28,12 @@ extern "C" {
#include "trpc.h"
// message type
#define TSDB_MSG_TYPE_REG 1
#define TSDB_MSG_TYPE_REG_RSP 2
#define TSDB_MSG_TYPE_SUBMIT 3
#define TSDB_MSG_TYPE_SUBMIT_RSP 4
#define TSDB_MSG_TYPE_QUERY 5
#define TSDB_MSG_TYPE_QUERY_RSP 6
#define TSDB_MSG_TYPE_
RETRIEVE
7
#define TSDB_MSG_TYPE_
RETRIEVE_RSP
8
#define TSDB_MSG_TYPE_
FETCH
7
#define TSDB_MSG_TYPE_
FETCH_RSP
8
// message from mnode to dnode
#define TSDB_MSG_TYPE_MD_CREATE_TABLE 9
...
...
@@ -74,8 +72,6 @@ extern "C" {
#define TSDB_MSG_TYPE_CM_CREATE_DNODE_RSP 46
#define TSDB_MSG_TYPE_CM_DROP_DNODE 47
#define TSDB_MSG_TYPE_CM_DROP_DNODE_RSP 48
#define TSDB_MSG_TYPE_CM_CONFIG_DNODE TSDB_MSG_TYPE_MD_CONFIG_DNODE
#define TSDB_MSG_TYPE_CM_CONFIG_DNODE_RSP TSDB_MSG_TYPE_MD_CONFIG_DNODE_RSP
#define TSDB_MSG_TYPE_CM_CREATE_DB 49
#define TSDB_MSG_TYPE_CM_CREATE_DB_RSP 50
#define TSDB_MSG_TYPE_CM_DROP_DB 51
...
...
@@ -103,11 +99,15 @@ extern "C" {
#define TSDB_MSG_TYPE_CM_KILL_QUERY 73
#define TSDB_MSG_TYPE_CM_KILL_QUERY_RSP 74
#define TSDB_MSG_TYPE_CM_KILL_STREAM 75
#define TSDB_MSG_TYPE_CM_KILL_STREAM_RSP 76
#define TSDB_MSG_TYPE_CM_KILL_CONN 77
#define TSDB_MSG_TYPE_CM_KILL_CONN_RSP 78
#define TSDB_MSG_TYPE_CM_HEARTBEAT 79
#define TSDB_MSG_TYPE_CM_HEARTBEAT_RSP 80
#define TSDB_MSG_TYPE_CM_KILL_STREAM_RSP 76
#define TSDB_MSG_TYPE_CM_KILL_CONN 77
#define TSDB_MSG_TYPE_CM_KILL_CONN_RSP 78
#define TSDB_MSG_TYPE_CM_CONFIG_DNODE 79
#define TSDB_MSG_TYPE_CM_CONFIG_DNODE_RSP 80
#define TSDB_MSG_TYPE_CM_RETRIEVE 81
#define TSDB_MSG_TYPE_CM_RETRIEVE_RSP 82
#define TSDB_MSG_TYPE_CM_HEARTBEAT 83
#define TSDB_MSG_TYPE_CM_HEARTBEAT_RSP 84
// message from dnode to mnode
#define TSDB_MSG_TYPE_DM_CONFIG_TABLE 91
...
...
src/mnode/src/mgmtShell.c
浏览文件 @
fb27589c
...
...
@@ -61,7 +61,7 @@ static SShowRetrieveFp tsMgmtShowRetrieveFp[TSDB_MGMT_TABLE_MAX] = {0};
int32_t
mgmtInitShell
()
{
mgmtAddShellMsgHandle
(
TSDB_MSG_TYPE_CM_SHOW
,
mgmtProcessShowMsg
);
mgmtAddShellMsgHandle
(
TSDB_MSG_TYPE_RETRIEVE
,
mgmtProcessRetrieveMsg
);
mgmtAddShellMsgHandle
(
TSDB_MSG_TYPE_
CM_
RETRIEVE
,
mgmtProcessRetrieveMsg
);
mgmtAddShellMsgHandle
(
TSDB_MSG_TYPE_CM_HEARTBEAT
,
mgmtProcessHeartBeatMsg
);
mgmtAddShellMsgHandle
(
TSDB_MSG_TYPE_CM_CONNECT
,
mgmtProcessConnectMsg
);
mgmtAddShellMsgHandle
(
TSDB_MSG_TYPE_CM_USE_DB
,
mgmtProcessUseMsg
);
...
...
@@ -490,7 +490,7 @@ static bool mgmtCheckMsgReadOnly(SQueuedMsg *pMsg) {
return
mgmtCheckTableMetaMsgReadOnly
(
pMsg
);
}
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_CM_STABLE_VGROUP
||
pMsg
->
msgType
==
TSDB_MSG_TYPE_
RETRIEVE
||
if
(
pMsg
->
msgType
==
TSDB_MSG_TYPE_CM_STABLE_VGROUP
||
pMsg
->
msgType
==
TSDB_MSG_TYPE_
CM_RETRIEVE
||
pMsg
->
msgType
==
TSDB_MSG_TYPE_CM_SHOW
||
pMsg
->
msgType
==
TSDB_MSG_TYPE_CM_TABLES_META
||
pMsg
->
msgType
==
TSDB_MSG_TYPE_CM_CONNECT
)
{
return
true
;
...
...
src/rpc/src/rpcMain.c
浏览文件 @
fb27589c
...
...
@@ -363,7 +363,7 @@ void rpcSendRequest(void *shandle, const SRpcIpSet *pIpSet, const SRpcMsg *pMsg)
// connection type is application specific.
// for TDengine, all the query, show commands shall have TCP connection
char
type
=
pMsg
->
msgType
;
if
(
type
==
TSDB_MSG_TYPE_QUERY
||
type
==
TSDB_MSG_TYPE_
RETRIEVE
||
if
(
type
==
TSDB_MSG_TYPE_QUERY
||
type
==
TSDB_MSG_TYPE_
CM_RETRIEVE
||
type
==
TSDB_MSG_TYPE_FETCH
||
type
==
TSDB_MSG_TYPE_CM_STABLE_VGROUP
||
type
==
TSDB_MSG_TYPE_CM_TABLES_META
||
type
==
TSDB_MSG_TYPE_CM_SHOW
)
pContext
->
connType
=
RPC_CONN_TCPC
;
...
...
@@ -802,7 +802,7 @@ static SRpcConn *rpcProcessMsgHead(SRpcInfo *pRpc, SRecvInfo *pRecv) {
pHead
->
code
=
htonl
(
pHead
->
code
);
if
(
terrno
==
0
)
{
if
(
pHead
->
msgType
!=
TSDB_MSG_TYPE_REG
&&
pHead
->
encrypt
)
{
if
(
pHead
->
encrypt
)
{
// decrypt here
}
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
fb27589c
...
...
@@ -29,11 +29,11 @@
static
int32_t
(
*
vnodeProcessReadMsgFp
[
TSDB_MSG_TYPE_MAX
])(
SVnodeObj
*
,
void
*
pCont
,
int32_t
contLen
,
SRspRet
*
pRet
);
static
int32_t
vnodeProcessQueryMsg
(
SVnodeObj
*
pVnode
,
void
*
pCont
,
int32_t
contLen
,
SRspRet
*
pRet
);
static
int32_t
vnodeProcess
Retrieve
Msg
(
SVnodeObj
*
pVnode
,
void
*
pCont
,
int32_t
contLen
,
SRspRet
*
pRet
);
static
int32_t
vnodeProcess
Fetch
Msg
(
SVnodeObj
*
pVnode
,
void
*
pCont
,
int32_t
contLen
,
SRspRet
*
pRet
);
void
vnodeInitReadFp
(
void
)
{
vnodeProcessReadMsgFp
[
TSDB_MSG_TYPE_QUERY
]
=
vnodeProcessQueryMsg
;
vnodeProcessReadMsgFp
[
TSDB_MSG_TYPE_
RETRIEVE
]
=
vnodeProcessRetrieve
Msg
;
vnodeProcessReadMsgFp
[
TSDB_MSG_TYPE_QUERY
]
=
vnodeProcessQueryMsg
;
vnodeProcessReadMsgFp
[
TSDB_MSG_TYPE_
FETCH
]
=
vnodeProcessFetch
Msg
;
}
int32_t
vnodeProcessRead
(
void
*
param
,
int
msgType
,
void
*
pCont
,
int32_t
contLen
,
SRspRet
*
ret
)
{
...
...
@@ -76,7 +76,7 @@ static int32_t vnodeProcessQueryMsg(SVnodeObj *pVnode, void *pCont, int32_t cont
return
code
;
}
static
int32_t
vnodeProcess
Retrieve
Msg
(
SVnodeObj
*
pVnode
,
void
*
pCont
,
int32_t
contLen
,
SRspRet
*
pRet
)
{
static
int32_t
vnodeProcess
Fetch
Msg
(
SVnodeObj
*
pVnode
,
void
*
pCont
,
int32_t
contLen
,
SRspRet
*
pRet
)
{
SRetrieveTableMsg
*
pRetrieve
=
pCont
;
void
*
pQInfo
=
(
void
*
)
htobe64
(
pRetrieve
->
qhandle
);
memset
(
pRet
,
0
,
sizeof
(
SRspRet
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录