Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
dffe02e3
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dffe02e3
编写于
12月 22, 2022
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:modify delete msg type to tmq meta
上级
51a6aa51
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
38 addition
and
38 deletion
+38
-38
source/client/src/clientRawBlockWrite.c
source/client/src/clientRawBlockWrite.c
+38
-38
未找到文件。
source/client/src/clientRawBlockWrite.c
浏览文件 @
dffe02e3
...
...
@@ -179,7 +179,7 @@ static char* buildAlterSTableJson(void* alterData, int32_t alterDataLen) {
}
string
=
cJSON_PrintUnformatted
(
json
);
end:
end:
cJSON_Delete
(
json
);
tFreeSMAltertbReq
(
&
req
);
return
string
;
...
...
@@ -200,7 +200,7 @@ static char* processCreateStb(SMqMetaRsp* metaRsp) {
}
string
=
buildCreateTableJson
(
&
req
.
schemaRow
,
&
req
.
schemaTag
,
req
.
name
,
req
.
suid
,
TSDB_SUPER_TABLE
);
_err:
_err:
tDecoderClear
(
&
coder
);
return
string
;
}
...
...
@@ -220,7 +220,7 @@ static char* processAlterStb(SMqMetaRsp* metaRsp) {
}
string
=
buildAlterSTableJson
(
req
.
alterOriData
,
req
.
alterOriDataLen
);
_err:
_err:
tDecoderClear
(
&
coder
);
return
string
;
}
...
...
@@ -302,7 +302,7 @@ static void buildChildElement(cJSON* json, SVCreateTbReq* pCreateReq) {
cJSON_AddItemToArray
(
tags
,
tag
);
}
end:
end:
cJSON_AddItemToObject
(
json
,
"tags"
,
tags
);
taosArrayDestroy
(
pTagVals
);
}
...
...
@@ -360,7 +360,7 @@ static char* processCreateTable(SMqMetaRsp* metaRsp) {
}
}
_exit:
_exit:
for
(
int32_t
iReq
=
0
;
iReq
<
req
.
nReqs
;
iReq
++
)
{
pCreateReq
=
req
.
pReqs
+
iReq
;
taosMemoryFreeClear
(
pCreateReq
->
comment
);
...
...
@@ -393,7 +393,7 @@ static char* processAutoCreateTable(STaosxRsp* rsp) {
}
string
=
buildCreateCTableJson
(
pCreateReq
,
rsp
->
createTableNum
);
_exit:
_exit:
for
(
int
i
=
0
;
i
<
rsp
->
createTableNum
;
i
++
)
{
tDecoderClear
(
&
decoder
[
i
]);
taosMemoryFreeClear
(
pCreateReq
[
i
].
comment
);
...
...
@@ -515,7 +515,7 @@ static char* processAlterTable(SMqMetaRsp* metaRsp) {
}
string
=
cJSON_PrintUnformatted
(
json
);
_exit:
_exit:
cJSON_Delete
(
json
);
tDecoderClear
(
&
decoder
);
return
string
;
...
...
@@ -548,7 +548,7 @@ static char* processDropSTable(SMqMetaRsp* metaRsp) {
string
=
cJSON_PrintUnformatted
(
json
);
_exit:
_exit:
cJSON_Delete
(
json
);
tDecoderClear
(
&
decoder
);
return
string
;
...
...
@@ -590,7 +590,7 @@ static char* processDropTable(SMqMetaRsp* metaRsp) {
string
=
cJSON_PrintUnformatted
(
json
);
_exit:
_exit:
cJSON_Delete
(
json
);
tDecoderClear
(
&
decoder
);
return
string
;
...
...
@@ -678,7 +678,7 @@ static int32_t taosCreateStb(TAOS* taos, void* meta, int32_t metaLen) {
code
=
pRequest
->
code
;
taosMemoryFree
(
pCmdMsg
.
pMsg
);
end:
end:
destroyRequest
(
pRequest
);
tFreeSMCreateStbReq
(
&
pReq
);
tDecoderClear
(
&
coder
);
...
...
@@ -748,7 +748,7 @@ static int32_t taosDropStb(TAOS* taos, void* meta, int32_t metaLen) {
code
=
pRequest
->
code
;
taosMemoryFree
(
pCmdMsg
.
pMsg
);
end:
end:
destroyRequest
(
pRequest
);
tDecoderClear
(
&
coder
);
return
code
;
...
...
@@ -809,9 +809,9 @@ static int32_t taosCreateTable(TAOS* taos, void* meta, int32_t metaLen) {
taosHashSetFreeFp
(
pVgroupHashmap
,
destroyCreateTbReqBatch
);
SRequestConnInfo
conn
=
{.
pTrans
=
pTscObj
->
pAppInfo
->
pTransporter
,
.
requestId
=
pRequest
->
requestId
,
.
requestObjRefId
=
pRequest
->
self
,
.
mgmtEps
=
getEpSet_s
(
&
pTscObj
->
pAppInfo
->
mgmtEp
)};
.
requestId
=
pRequest
->
requestId
,
.
requestObjRefId
=
pRequest
->
self
,
.
mgmtEps
=
getEpSet_s
(
&
pTscObj
->
pAppInfo
->
mgmtEp
)};
pRequest
->
tableList
=
taosArrayInit
(
req
.
nReqs
,
sizeof
(
SName
));
// loop to create table
...
...
@@ -891,7 +891,7 @@ static int32_t taosCreateTable(TAOS* taos, void* meta, int32_t metaLen) {
code
=
pRequest
->
code
;
end:
end:
for
(
int32_t
iReq
=
0
;
iReq
<
req
.
nReqs
;
iReq
++
)
{
pCreateReq
=
req
.
pReqs
+
iReq
;
taosMemoryFreeClear
(
pCreateReq
->
comment
);
...
...
@@ -961,9 +961,9 @@ static int32_t taosDropTable(TAOS* taos, void* meta, int32_t metaLen) {
taosHashSetFreeFp
(
pVgroupHashmap
,
destroyDropTbReqBatch
);
SRequestConnInfo
conn
=
{.
pTrans
=
pTscObj
->
pAppInfo
->
pTransporter
,
.
requestId
=
pRequest
->
requestId
,
.
requestObjRefId
=
pRequest
->
self
,
.
mgmtEps
=
getEpSet_s
(
&
pTscObj
->
pAppInfo
->
mgmtEp
)};
.
requestId
=
pRequest
->
requestId
,
.
requestObjRefId
=
pRequest
->
self
,
.
mgmtEps
=
getEpSet_s
(
&
pTscObj
->
pAppInfo
->
mgmtEp
)};
pRequest
->
tableList
=
taosArrayInit
(
req
.
nReqs
,
sizeof
(
SName
));
// loop to create table
for
(
int32_t
iReq
=
0
;
iReq
<
req
.
nReqs
;
iReq
++
)
{
...
...
@@ -1015,7 +1015,7 @@ static int32_t taosDropTable(TAOS* taos, void* meta, int32_t metaLen) {
}
code
=
pRequest
->
code
;
end:
end:
taosHashCleanup
(
pVgroupHashmap
);
destroyRequest
(
pRequest
);
tDecoderClear
(
&
coder
);
...
...
@@ -1073,7 +1073,7 @@ static int32_t taosDeleteData(TAOS* taos, void* meta, int32_t metaLen) {
char
sql
[
256
]
=
{
0
};
snprintf
(
sql
,
sizeof
(
sql
),
"delete from `%s` where `%s` >= %"
PRId64
" and `%s` <= %"
PRId64
,
req
.
tableFName
,
req
.
tsColName
,
req
.
skey
,
req
.
tsColName
,
req
.
ekey
);
printf
(
"delete sql:%s
\n
"
,
sql
);
uDebug
(
"delete sql:%s
\n
"
,
sql
);
TAOS_RES
*
res
=
taos_query
(
taos
,
sql
);
SRequestObj
*
pRequest
=
(
SRequestObj
*
)
res
;
...
...
@@ -1083,7 +1083,7 @@ static int32_t taosDeleteData(TAOS* taos, void* meta, int32_t metaLen) {
}
taos_free_result
(
res
);
end:
end:
tDecoderClear
(
&
coder
);
return
code
;
}
...
...
@@ -1130,9 +1130,9 @@ static int32_t taosAlterTable(TAOS* taos, void* meta, int32_t metaLen) {
}
SRequestConnInfo
conn
=
{.
pTrans
=
pTscObj
->
pAppInfo
->
pTransporter
,
.
requestId
=
pRequest
->
requestId
,
.
requestObjRefId
=
pRequest
->
self
,
.
mgmtEps
=
getEpSet_s
(
&
pTscObj
->
pAppInfo
->
mgmtEp
)};
.
requestId
=
pRequest
->
requestId
,
.
requestObjRefId
=
pRequest
->
self
,
.
mgmtEps
=
getEpSet_s
(
&
pTscObj
->
pAppInfo
->
mgmtEp
)};
SVgroupInfo
pInfo
=
{
0
};
SName
pName
=
{
0
};
...
...
@@ -1191,7 +1191,7 @@ static int32_t taosAlterTable(TAOS* taos, void* meta, int32_t metaLen) {
code
=
handleAlterTbExecRes
(
pRes
->
res
,
pCatalog
);
}
}
end:
end:
taosArrayDestroy
(
pArray
);
if
(
pVgData
)
taosMemoryFreeClear
(
pVgData
->
pData
);
taosMemoryFreeClear
(
pVgData
);
...
...
@@ -1267,14 +1267,14 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch
uint16_t
fLen
=
0
;
int32_t
rowSize
=
0
;
int16_t
nVar
=
0
;
for
(
int
i
=
0
;
i
<
pTableMeta
->
tableInfo
.
numOfColumns
;
i
++
)
{
SSchema
*
schema
=
pTableMeta
->
schema
+
i
;
fLen
+=
TYPE_BYTES
[
schema
->
type
];
rowSize
+=
schema
->
bytes
;
if
(
IS_VAR_DATA_TYPE
(
schema
->
type
))
{
nVar
++
;
}
for
(
int
i
=
0
;
i
<
pTableMeta
->
tableInfo
.
numOfColumns
;
i
++
)
{
SSchema
*
schema
=
pTableMeta
->
schema
+
i
;
fLen
+=
TYPE_BYTES
[
schema
->
type
];
rowSize
+=
schema
->
bytes
;
if
(
IS_VAR_DATA_TYPE
(
schema
->
type
))
{
nVar
++
;
}
}
fLen
-=
sizeof
(
TSKEY
);
...
...
@@ -1597,7 +1597,7 @@ int taos_write_raw_block(TAOS* taos, int rows, char* pData, const char* tbname)
launchQueryImpl
(
pRequest
,
pQuery
,
true
,
NULL
);
code
=
pRequest
->
code
;
end:
end:
taosMemoryFreeClear
(
pTableMeta
);
qDestroyQuery
(
pQuery
);
taosMemoryFree
(
subReq
);
...
...
@@ -1652,7 +1652,7 @@ static int32_t tmqWriteRawDataImpl(TAOS* taos, void* data, int32_t dataLen) {
conn
.
requestObjRefId
=
pRequest
->
self
;
conn
.
mgmtEps
=
getEpSet_s
(
&
pRequest
->
pTscObj
->
pAppInfo
->
mgmtEp
);
printf
(
"raw data block num:%d
\n
"
,
rspObj
.
rsp
.
blockNum
);
uDebug
(
"raw data block num:%d
\n
"
,
rspObj
.
rsp
.
blockNum
);
while
(
++
rspObj
.
resIter
<
rspObj
.
rsp
.
blockNum
)
{
SRetrieveTableRsp
*
pRetrieve
=
(
SRetrieveTableRsp
*
)
taosArrayGetP
(
rspObj
.
rsp
.
blockData
,
rspObj
.
resIter
);
if
(
!
rspObj
.
rsp
.
withSchema
)
{
...
...
@@ -1675,7 +1675,7 @@ static int32_t tmqWriteRawDataImpl(TAOS* taos, void* data, int32_t dataLen) {
goto
end
;
}
printf
(
"raw data tbname:%s
\n
"
,
tbName
);
uDebug
(
"raw data tbname:%s
\n
"
,
tbName
);
SName
pName
=
{
TSDB_TABLE_NAME_T
,
pRequest
->
pTscObj
->
acctId
,
{
0
},
{
0
}};
strcpy
(
pName
.
dbname
,
pRequest
->
pDb
);
strcpy
(
pName
.
tname
,
tbName
);
...
...
@@ -1861,7 +1861,7 @@ static int32_t tmqWriteRawDataImpl(TAOS* taos, void* data, int32_t dataLen) {
launchQueryImpl
(
pRequest
,
pQuery
,
true
,
NULL
);
code
=
pRequest
->
code
;
end:
end:
tDeleteSMqDataRsp
(
&
rspObj
.
rsp
);
rspObj
.
resInfo
.
pRspMsg
=
NULL
;
doFreeReqResultInfo
(
&
rspObj
.
resInfo
);
...
...
@@ -1922,7 +1922,7 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen)
conn
.
requestObjRefId
=
pRequest
->
self
;
conn
.
mgmtEps
=
getEpSet_s
(
&
pRequest
->
pTscObj
->
pAppInfo
->
mgmtEp
);
printf
(
"raw data block num:%d
\n
"
,
rspObj
.
rsp
.
blockNum
);
uDebug
(
"raw data block num:%d
\n
"
,
rspObj
.
rsp
.
blockNum
);
while
(
++
rspObj
.
resIter
<
rspObj
.
rsp
.
blockNum
)
{
SRetrieveTableRsp
*
pRetrieve
=
(
SRetrieveTableRsp
*
)
taosArrayGetP
(
rspObj
.
rsp
.
blockData
,
rspObj
.
resIter
);
if
(
!
rspObj
.
rsp
.
withSchema
)
{
...
...
@@ -1945,7 +1945,7 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen)
goto
end
;
}
printf
(
"raw data tbname:%s
\n
"
,
tbName
);
uDebug
(
"raw data tbname:%s
\n
"
,
tbName
);
SName
pName
=
{
TSDB_TABLE_NAME_T
,
pRequest
->
pTscObj
->
acctId
,
{
0
},
{
0
}};
strcpy
(
pName
.
dbname
,
pRequest
->
pDb
);
strcpy
(
pName
.
tname
,
tbName
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录