Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
09fe692b
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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,发现更多精彩内容 >>
提交
09fe692b
编写于
1月 04, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-11818] refactor log/fix bug in create child table.
上级
9b312e90
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
122 addition
and
130 deletion
+122
-130
include/libs/catalog/catalog.h
include/libs/catalog/catalog.h
+2
-2
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+2
-2
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+6
-7
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+96
-101
source/libs/catalog/src/catalog.c
source/libs/catalog/src/catalog.c
+4
-6
source/libs/parser/src/dCDAstProcess.c
source/libs/parser/src/dCDAstProcess.c
+1
-1
source/libs/qcom/src/querymsg.c
source/libs/qcom/src/querymsg.c
+4
-7
source/libs/transport/src/rpcMain.c
source/libs/transport/src/rpcMain.c
+7
-4
未找到文件。
include/libs/catalog/catalog.h
浏览文件 @
09fe692b
...
@@ -90,12 +90,12 @@ int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void * pTransporter, cons
...
@@ -90,12 +90,12 @@ int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void * pTransporter, cons
/**
/**
* Force renew a table's local cached meta data.
* Force renew a table's local cached meta data.
* @param pCatalog (input, got with catalogGetHandle)
* @param pCatalog (input, got with catalogGetHandle)
* @param p
Rpc
(input, rpc object)
* @param p
Transporter
(input, rpc object)
* @param pMgmtEps (input, mnode EPs)
* @param pMgmtEps (input, mnode EPs)
* @param pTableName (input, table name, NOT including db name)
* @param pTableName (input, table name, NOT including db name)
* @return error code
* @return error code
*/
*/
int32_t
catalogRenewTableMeta
(
struct
SCatalog
*
pCatalog
,
void
*
pRpc
,
const
SEpSet
*
pMgmtEps
,
const
SName
*
pTableName
);
int32_t
catalogRenewTableMeta
(
struct
SCatalog
*
pCatalog
,
void
*
pTransporter
,
const
SEpSet
*
pMgmtEps
,
const
SName
*
pTableName
);
/**
/**
* Force renew a table's local cached meta data and get the new one.
* Force renew a table's local cached meta data and get the new one.
...
...
source/client/src/clientEnv.c
浏览文件 @
09fe692b
...
@@ -53,8 +53,8 @@ static void registerRequest(SRequestObj* pRequest) {
...
@@ -53,8 +53,8 @@ static void registerRequest(SRequestObj* pRequest) {
int32_t
total
=
atomic_add_fetch_32
(
&
pSummary
->
totalRequests
,
1
);
int32_t
total
=
atomic_add_fetch_32
(
&
pSummary
->
totalRequests
,
1
);
int32_t
currentInst
=
atomic_add_fetch_32
(
&
pSummary
->
currentRequests
,
1
);
int32_t
currentInst
=
atomic_add_fetch_32
(
&
pSummary
->
currentRequests
,
1
);
tscDebug
(
"0x%"
PRIx64
" new Request from connObj:0x%"
PRIx64
", current:%d, app current:%d, total:%d
"
,
pRequest
->
self
,
tscDebug
(
"0x%"
PRIx64
" new Request from connObj:0x%"
PRIx64
", current:%d, app current:%d, total:%d
, reqId:0x%"
PRIx64
,
pRequest
->
self
,
pRequest
->
pTscObj
->
id
,
num
,
currentInst
,
total
);
pRequest
->
pTscObj
->
id
,
num
,
currentInst
,
total
,
pRequest
->
requestId
);
}
}
}
}
...
...
source/client/src/clientImpl.c
浏览文件 @
09fe692b
...
@@ -371,7 +371,7 @@ STscObj* taosConnectImpl(const char *ip, const char *user, const char *auth, con
...
@@ -371,7 +371,7 @@ STscObj* taosConnectImpl(const char *ip, const char *user, const char *auth, con
taos_close
(
pTscObj
);
taos_close
(
pTscObj
);
pTscObj
=
NULL
;
pTscObj
=
NULL
;
}
else
{
}
else
{
tscDebug
(
"0x%"
PRIx64
" connection is opening, connId:%d, dnodeConn:%p
"
,
pTscObj
->
id
,
pTscObj
->
connId
,
pTscObj
->
pTransporter
);
tscDebug
(
"0x%"
PRIx64
" connection is opening, connId:%d, dnodeConn:%p
, reqId:0x%"
PRIx64
,
pTscObj
->
id
,
pTscObj
->
connId
,
pTscObj
->
pTransporter
,
pRequest
->
requestId
);
destroyRequest
(
pRequest
);
destroyRequest
(
pRequest
);
}
}
...
@@ -441,14 +441,13 @@ void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) {
...
@@ -441,14 +441,13 @@ void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) {
* There is not response callback function for submit response.
* There is not response callback function for submit response.
* The actual inserted number of points is the first number.
* The actual inserted number of points is the first number.
*/
*/
int32_t
elapsed
=
pRequest
->
metric
.
rsp
-
pRequest
->
metric
.
start
;
if
(
pMsg
->
code
==
TSDB_CODE_SUCCESS
)
{
if
(
pMsg
->
code
==
TSDB_CODE_SUCCESS
)
{
tscDebug
(
"0x%"
PRIx64
" message:%s, code:%s rspLen:%d, elapsed:%"
PRId64
" ms"
,
pRequest
->
requestId
,
tscDebug
(
"0x%"
PRIx64
" message:%s, code:%s rspLen:%d, elapsed:%d ms, reqId:0x%"
PRIx64
,
pRequest
->
requestId
,
TMSG_INFO
(
pMsg
->
msgType
),
tstrerror
(
pMsg
->
code
),
pMsg
->
contLen
,
TMSG_INFO
(
pMsg
->
msgType
),
tstrerror
(
pMsg
->
code
),
pMsg
->
contLen
,
elapsed
,
pRequest
->
requestId
);
pRequest
->
metric
.
rsp
-
pRequest
->
metric
.
start
);
}
else
{
}
else
{
tscError
(
"0x%"
PRIx64
" SQL cmd:%s, code:%s rspLen:%d, elapsed time:%"
PRId64
" ms"
,
pRequest
->
requestId
,
tscError
(
"reqId:0x%"
PRIx64
" SQL cmd:%s, code:%s rspLen:%d, elapsed time:%d ms, reqId:0x"
PRIx64
,
pRequest
->
requestId
,
TMSG_INFO
(
pMsg
->
msgType
),
tstrerror
(
pMsg
->
code
),
pMsg
->
contLen
,
TMSG_INFO
(
pMsg
->
msgType
),
tstrerror
(
pMsg
->
code
),
pMsg
->
contLen
,
elapsed
,
pRequest
->
requestId
);
pRequest
->
metric
.
rsp
-
pRequest
->
metric
.
start
);
}
}
taosReleaseRef
(
clientReqRefPool
,
pSendInfo
->
requestObjRefId
);
taosReleaseRef
(
clientReqRefPool
,
pSendInfo
->
requestObjRefId
);
...
...
source/client/test/clientTests.cpp
浏览文件 @
09fe692b
...
@@ -57,95 +57,95 @@ TEST(testCase, connect_Test) {
...
@@ -57,95 +57,95 @@ TEST(testCase, connect_Test) {
taos_close
(
pConn
);
taos_close
(
pConn
);
}
}
//TEST(testCase, create_user_Test) {
TEST
(
testCase
,
create_user_Test
)
{
// TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
// assert(pConn != NULL);
assert
(
pConn
!=
NULL
);
//
// TAOS_RES* pRes = taos_query(pConn, "create user abc pass 'abc'");
// if (taos_errno(pRes) != TSDB_CODE_SUCCESS) {
// printf("failed to create user, reason:%s\n", taos_errstr(pRes));
// }
//
// taos_free_result(pRes);
// taos_close(pConn);
//}
//
//TEST(testCase, create_account_Test) {
// TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "create account aabc pass 'abc'");
// if (taos_errno(pRes) != TSDB_CODE_SUCCESS) {
// printf("failed to create user, reason:%s\n", taos_errstr(pRes));
// }
//
// taos_free_result(pRes);
// taos_close(pConn);
//}
//
//TEST(testCase, drop_account_Test) {
// TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "drop account aabc");
// if (taos_errno(pRes) != TSDB_CODE_SUCCESS) {
// printf("failed to create user, reason:%s\n", taos_errstr(pRes));
// }
//
// taos_free_result(pRes);
// taos_close(pConn);
//}
//TEST(testCase, show_user_Test) {
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create user abc pass 'abc'"
);
// TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
if
(
taos_errno
(
pRes
)
!=
TSDB_CODE_SUCCESS
)
{
// assert(pConn != NULL);
printf
(
"failed to create user, reason:%s
\n
"
,
taos_errstr
(
pRes
));
//
}
// TAOS_RES* pRes = taos_query(pConn, "show users");
// TAOS_ROW pRow = NULL;
//
// TAOS_FIELD* pFields = taos_fetch_fields(pRes);
// int32_t numOfFields = taos_num_fields(pRes);
//
// char str[512] = {0};
// while((pRow = taos_fetch_row(pRes)) != NULL) {
// int32_t code = taos_print_row(str, pRow, pFields, numOfFields);
// printf("%s\n", str);
// }
//
// taos_close(pConn);
//}
//TEST(testCase, drop_user_Test) {
taos_free_result
(
pRes
);
// TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
taos_close
(
pConn
);
}
TEST
(
testCase
,
create_account_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create account aabc pass 'abc'"
);
if
(
taos_errno
(
pRes
)
!=
TSDB_CODE_SUCCESS
)
{
printf
(
"failed to create user, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
TEST
(
testCase
,
drop_account_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"drop account aabc"
);
if
(
taos_errno
(
pRes
)
!=
TSDB_CODE_SUCCESS
)
{
printf
(
"failed to create user, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
TEST
(
testCase
,
show_user_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"show users"
);
TAOS_ROW
pRow
=
NULL
;
TAOS_FIELD
*
pFields
=
taos_fetch_fields
(
pRes
);
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
char
str
[
512
]
=
{
0
};
while
((
pRow
=
taos_fetch_row
(
pRes
))
!=
NULL
)
{
int32_t
code
=
taos_print_row
(
str
,
pRow
,
pFields
,
numOfFields
);
printf
(
"%s
\n
"
,
str
);
}
taos_close
(
pConn
);
}
TEST
(
testCase
,
drop_user_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"drop user abc"
);
if
(
taos_errno
(
pRes
)
!=
TSDB_CODE_SUCCESS
)
{
printf
(
"failed to create user, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
TEST
(
testCase
,
show_db_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
// assert(pConn != NULL);
// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "drop user abc");
// if (taos_errno(pRes) != TSDB_CODE_SUCCESS) {
// printf("failed to create user, reason:%s\n", taos_errstr(pRes));
// }
//
// taos_free_result(pRes);
// taos_close(pConn);
//}
//TEST(testCase, show_db_Test) {
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"show databases"
);
// TAOS* pConn = taos_connect("localhost", "root", "taosdata", NULL, 0);
TAOS_ROW
pRow
=
NULL
;
//// assert(pConn != NULL);
//
TAOS_FIELD
*
pFields
=
taos_fetch_fields
(
pRes
);
// TAOS_RES* pRes = taos_query(pConn, "show databases");
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
// TAOS_ROW pRow = NULL;
//
char
str
[
512
]
=
{
0
};
// TAOS_FIELD* pFields = taos_fetch_fields(pRes);
while
((
pRow
=
taos_fetch_row
(
pRes
))
!=
NULL
)
{
// int32_t numOfFields = taos_num_fields(pRes);
int32_t
code
=
taos_print_row
(
str
,
pRow
,
pFields
,
numOfFields
);
//
printf
(
"%s
\n
"
,
str
);
// char str[512] = {0};
}
// while((pRow = taos_fetch_row(pRes)) != NULL) {
// int32_t code = taos_print_row(str, pRow, pFields, numOfFields);
taos_close
(
pConn
);
// printf("%s\n", str);
}
// }
//
// taos_close(pConn);
//}
TEST
(
testCase
,
create_db_Test
)
{
TEST
(
testCase
,
create_db_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
...
@@ -500,22 +500,17 @@ TEST(testCase, create_multiple_tables) {
...
@@ -500,22 +500,17 @@ TEST(testCase, create_multiple_tables) {
}
}
TEST
(
testCase
,
generated_request_id_test
)
{
TEST
(
testCase
,
generated_request_id_test
)
{
uint64_t
id0
=
generateRequestId
();
SHashObj
*
phash
=
taosHashInit
(
10000
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BIGINT
),
false
,
HASH_ENTRY_LOCK
);
uint64_t
id1
=
generateRequestId
();
for
(
int32_t
i
=
0
;
i
<
1000000
;
++
i
)
{
uint64_t
id2
=
generateRequestId
();
uint64_t
v
=
generateRequestId
();
uint64_t
id3
=
generateRequestId
();
void
*
result
=
taosHashGet
(
phash
,
&
v
,
sizeof
(
v
));
uint64_t
id4
=
generateRequestId
();
ASSERT_EQ
(
result
,
nullptr
);
ASSERT_NE
(
id0
,
id1
);
taosHashPut
(
phash
,
&
v
,
sizeof
(
v
),
NULL
,
0
);
ASSERT_NE
(
id1
,
id2
);
}
ASSERT_NE
(
id2
,
id3
);
ASSERT_NE
(
id4
,
id3
);
taosHashClear
(
phash
);
ASSERT_NE
(
id0
,
id2
);
ASSERT_NE
(
id0
,
id4
);
ASSERT_NE
(
id0
,
id3
);
// SHashObj *phash = taosHashInit()
}
}
//TEST(testCase, projection_query_tables) {
//TEST(testCase, projection_query_tables) {
...
...
source/libs/catalog/src/catalog.c
浏览文件 @
09fe692b
...
@@ -675,28 +675,26 @@ int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pTransporter, const
...
@@ -675,28 +675,26 @@ int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pTransporter, const
return
ctgGetTableMetaImpl
(
pCatalog
,
pTransporter
,
pMgmtEps
,
pTableName
,
false
,
pTableMeta
);
return
ctgGetTableMetaImpl
(
pCatalog
,
pTransporter
,
pMgmtEps
,
pTableName
,
false
,
pTableMeta
);
}
}
int32_t
catalogRenewTableMeta
(
struct
SCatalog
*
pCatalog
,
void
*
p
Rpc
,
const
SEpSet
*
pMgmtEps
,
const
SName
*
pTableName
)
{
int32_t
catalogRenewTableMeta
(
struct
SCatalog
*
pCatalog
,
void
*
p
Transporter
,
const
SEpSet
*
pMgmtEps
,
const
SName
*
pTableName
)
{
if
(
NULL
==
pCatalog
||
NULL
==
p
Rpc
||
NULL
==
pMgmtEps
||
NULL
==
pTableName
)
{
if
(
NULL
==
pCatalog
||
NULL
==
p
Transporter
||
NULL
==
pMgmtEps
||
NULL
==
pTableName
)
{
CTG_ERR_RET
(
TSDB_CODE_CTG_INVALID_INPUT
);
CTG_ERR_RET
(
TSDB_CODE_CTG_INVALID_INPUT
);
}
}
SVgroupInfo
vgroupInfo
=
{
0
};
SVgroupInfo
vgroupInfo
=
{
0
};
int32_t
code
=
0
;
int32_t
code
=
0
;
CTG_ERR_RET
(
catalogGetTableHashVgroup
(
pCatalog
,
p
Rpc
,
pMgmtEps
,
pTableName
,
&
vgroupInfo
));
CTG_ERR_RET
(
catalogGetTableHashVgroup
(
pCatalog
,
p
Transporter
,
pMgmtEps
,
pTableName
,
&
vgroupInfo
));
STableMetaOutput
output
=
{
0
};
STableMetaOutput
output
=
{
0
};
CTG_ERR_RET
(
ctgGetTableMetaFromVnode
(
pCatalog
,
p
Rpc
,
pMgmtEps
,
pTableName
,
&
vgroupInfo
,
&
output
));
CTG_ERR_RET
(
ctgGetTableMetaFromVnode
(
pCatalog
,
p
Transporter
,
pMgmtEps
,
pTableName
,
&
vgroupInfo
,
&
output
));
//CTG_ERR_RET(ctgGetTableMetaFromMnode(pCatalog, pRpc, pMgmtEps, pTableName, &output));
//CTG_ERR_RET(ctgGetTableMetaFromMnode(pCatalog, pRpc, pMgmtEps, pTableName, &output));
CTG_ERR_JRET
(
ctgUpdateTableMetaCache
(
pCatalog
,
&
output
));
CTG_ERR_JRET
(
ctgUpdateTableMetaCache
(
pCatalog
,
&
output
));
_return:
_return:
tfree
(
output
.
tbMeta
);
tfree
(
output
.
tbMeta
);
CTG_RET
(
code
);
CTG_RET
(
code
);
}
}
...
...
source/libs/parser/src/dCDAstProcess.c
浏览文件 @
09fe692b
...
@@ -501,7 +501,7 @@ int32_t doCheckForCreateCTable(SSqlInfo* pInfo, SParseBasicCtx* pCtx, SMsgBuf* p
...
@@ -501,7 +501,7 @@ int32_t doCheckForCreateCTable(SSqlInfo* pInfo, SParseBasicCtx* pCtx, SMsgBuf* p
struct
SVCreateTbReq
req
=
{
0
};
struct
SVCreateTbReq
req
=
{
0
};
req
.
type
=
TD_CHILD_TABLE
;
req
.
type
=
TD_CHILD_TABLE
;
req
.
name
=
strdup
(
tNameGetTableName
(
&
tableName
));
req
.
name
=
strdup
(
tNameGetTableName
(
&
tableName
));
req
.
ctbCfg
.
suid
=
pSuperTableMeta
->
s
uid
;
req
.
ctbCfg
.
suid
=
pSuperTableMeta
->
uid
;
req
.
ctbCfg
.
pTag
=
row
;
req
.
ctbCfg
.
pTag
=
row
;
SVgroupTablesBatch
*
pTableBatch
=
taosHashGet
(
pVgroupHashmap
,
&
info
.
vgId
,
sizeof
(
info
.
vgId
));
SVgroupTablesBatch
*
pTableBatch
=
taosHashGet
(
pVgroupHashmap
,
&
info
.
vgId
,
sizeof
(
info
.
vgId
));
...
...
source/libs/qcom/src/querymsg.c
浏览文件 @
09fe692b
...
@@ -43,15 +43,12 @@ int32_t queryBuildTableMetaReqMsg(void* input, char **msg, int32_t msgSize, int3
...
@@ -43,15 +43,12 @@ int32_t queryBuildTableMetaReqMsg(void* input, char **msg, int32_t msgSize, int3
bMsg
->
header
.
vgId
=
htonl
(
bInput
->
vgId
);
bMsg
->
header
.
vgId
=
htonl
(
bInput
->
vgId
);
if
(
bInput
->
dbName
)
{
if
(
bInput
->
dbName
)
{
strncpy
(
bMsg
->
dbFname
,
bInput
->
dbName
,
sizeof
(
bMsg
->
dbFname
));
tstrncpy
(
bMsg
->
dbFname
,
bInput
->
dbName
,
tListLen
(
bMsg
->
dbFname
));
bMsg
->
dbFname
[
sizeof
(
bMsg
->
dbFname
)
-
1
]
=
0
;
}
}
strncpy
(
bMsg
->
tableFname
,
bInput
->
tableFullName
,
sizeof
(
bMsg
->
tableFname
));
tstrncpy
(
bMsg
->
tableFname
,
bInput
->
tableFullName
,
tListLen
(
bMsg
->
tableFname
));
bMsg
->
tableFname
[
sizeof
(
bMsg
->
tableFname
)
-
1
]
=
0
;
*
msgLen
=
(
int32_t
)
sizeof
(
*
bMsg
);
*
msgLen
=
(
int32_t
)
sizeof
(
*
bMsg
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
@@ -211,7 +208,7 @@ int32_t queryCreateTableMetaFromMsg(STableMetaMsg* msg, bool isSuperTable, STabl
...
@@ -211,7 +208,7 @@ int32_t queryCreateTableMetaFromMsg(STableMetaMsg* msg, bool isSuperTable, STabl
pTableMeta
->
vgId
=
isSuperTable
?
0
:
msg
->
vgId
;
pTableMeta
->
vgId
=
isSuperTable
?
0
:
msg
->
vgId
;
pTableMeta
->
tableType
=
isSuperTable
?
TSDB_SUPER_TABLE
:
msg
->
tableType
;
pTableMeta
->
tableType
=
isSuperTable
?
TSDB_SUPER_TABLE
:
msg
->
tableType
;
pTableMeta
->
uid
=
msg
->
s
uid
;
pTableMeta
->
uid
=
msg
->
t
uid
;
pTableMeta
->
suid
=
msg
->
suid
;
pTableMeta
->
suid
=
msg
->
suid
;
pTableMeta
->
sversion
=
msg
->
sversion
;
pTableMeta
->
sversion
=
msg
->
sversion
;
pTableMeta
->
tversion
=
msg
->
tversion
;
pTableMeta
->
tversion
=
msg
->
tversion
;
...
@@ -272,7 +269,7 @@ int32_t queryProcessTableMetaRsp(void* output, char *msg, int32_t msgSize) {
...
@@ -272,7 +269,7 @@ int32_t queryProcessTableMetaRsp(void* output, char *msg, int32_t msgSize) {
memcpy
(
pOut
->
tbFname
,
pMetaMsg
->
tbFname
,
sizeof
(
pOut
->
tbFname
));
memcpy
(
pOut
->
tbFname
,
pMetaMsg
->
tbFname
,
sizeof
(
pOut
->
tbFname
));
}
}
code
=
queryCreateTableMetaFromMsg
(
pMetaMsg
,
false
,
&
pOut
->
tbMeta
);
code
=
queryCreateTableMetaFromMsg
(
pMetaMsg
,
(
pMetaMsg
->
tableType
==
TSDB_SUPER_TABLE
)
,
&
pOut
->
tbMeta
);
}
}
return
code
;
return
code
;
...
...
source/libs/transport/src/rpcMain.c
浏览文件 @
09fe692b
...
@@ -1094,13 +1094,16 @@ static void *rpcProcessMsgFromPeer(SRecvInfo *pRecv) {
...
@@ -1094,13 +1094,16 @@ static void *rpcProcessMsgFromPeer(SRecvInfo *pRecv) {
SRpcReqContext
*
pContext
;
SRpcReqContext
*
pContext
;
pConn
=
rpcProcessMsgHead
(
pRpc
,
pRecv
,
&
pContext
);
pConn
=
rpcProcessMsgHead
(
pRpc
,
pRecv
,
&
pContext
);
char
ipstr
[
24
]
=
{
0
};
taosIpPort2String
(
pRecv
->
ip
,
pRecv
->
port
,
ipstr
);
if
(
TMSG_INDEX
(
pHead
->
msgType
)
>=
1
&&
TMSG_INDEX
(
pHead
->
msgType
)
<
TDMT_MAX
)
{
if
(
TMSG_INDEX
(
pHead
->
msgType
)
>=
1
&&
TMSG_INDEX
(
pHead
->
msgType
)
<
TDMT_MAX
)
{
tDebug
(
"%s %p %p, %s received from
0x%x:%hu
, parse code:0x%x len:%d sig:0x%08x:0x%08x:%d code:0x%x"
,
pRpc
->
label
,
tDebug
(
"%s %p %p, %s received from
%s
, parse code:0x%x len:%d sig:0x%08x:0x%08x:%d code:0x%x"
,
pRpc
->
label
,
pConn
,
(
void
*
)
pHead
->
ahandle
,
TMSG_INFO
(
pHead
->
msgType
),
pRecv
->
ip
,
pRecv
->
port
,
terrno
,
pRecv
->
msgLen
,
pConn
,
(
void
*
)
pHead
->
ahandle
,
TMSG_INFO
(
pHead
->
msgType
),
ipstr
,
terrno
,
pRecv
->
msgLen
,
pHead
->
sourceId
,
pHead
->
destId
,
pHead
->
tranId
,
pHead
->
code
);
pHead
->
sourceId
,
pHead
->
destId
,
pHead
->
tranId
,
pHead
->
code
);
}
else
{
}
else
{
tDebug
(
"%s %p %p, %d received from
0x%x:%hu
, parse code:0x%x len:%d sig:0x%08x:0x%08x:%d code:0x%x"
,
pRpc
->
label
,
tDebug
(
"%s %p %p, %d received from
%s
, parse code:0x%x len:%d sig:0x%08x:0x%08x:%d code:0x%x"
,
pRpc
->
label
,
pConn
,
(
void
*
)
pHead
->
ahandle
,
pHead
->
msgType
,
pRecv
->
ip
,
pRecv
->
port
,
terrno
,
pRecv
->
msgLen
,
pConn
,
(
void
*
)
pHead
->
ahandle
,
pHead
->
msgType
,
ipstr
,
terrno
,
pRecv
->
msgLen
,
pHead
->
sourceId
,
pHead
->
destId
,
pHead
->
tranId
,
pHead
->
code
);
pHead
->
sourceId
,
pHead
->
destId
,
pHead
->
tranId
,
pHead
->
code
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录