Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
74c201bc
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
74c201bc
编写于
3月 21, 2023
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:create same table use writemetadata interface
上级
220d4bf8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
14 deletion
+12
-14
source/client/src/clientRawBlockWrite.c
source/client/src/clientRawBlockWrite.c
+10
-12
source/libs/parser/src/parInsertUtil.c
source/libs/parser/src/parInsertUtil.c
+2
-2
未找到文件。
source/client/src/clientRawBlockWrite.c
浏览文件 @
74c201bc
...
...
@@ -1373,7 +1373,7 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch
uError
(
"WriteRaw:catalogGetTableMeta failed. table name: %s"
,
tbname
);
goto
end
;
}
uError
(
"td23101 0vgId:%d, vgId:%d, name:%s, uid:%"
PRIu64
,
vgData
.
vgId
,
pTableMeta
->
vgId
,
tbname
,
pTableMeta
->
uid
);
//
uError("td23101 0vgId:%d, vgId:%d, name:%s, uid:%"PRIu64, vgData.vgId, pTableMeta->vgId, tbname, pTableMeta->uid);
pQuery
=
smlInitHandle
();
if
(
pQuery
==
NULL
)
{
...
...
@@ -1382,7 +1382,7 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch
}
pVgHash
=
taosHashInit
(
16
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
HASH_NO_LOCK
);
taosHashPut
(
pVgHash
,
(
const
char
*
)
&
vgData
.
vgId
,
sizeof
(
vgData
.
vgId
),
(
char
*
)
&
vgData
,
sizeof
(
vgData
));
uError
(
"td23101 1vgId:%d, numEps:%d, name:%s, uid:%"
PRIu64
,
vgData
.
vgId
,
vgData
.
epSet
.
numOfEps
,
tbname
,
pTableMeta
->
uid
);
//
uError("td23101 1vgId:%d, numEps:%d, name:%s, uid:%"PRIu64, vgData.vgId, vgData.epSet.numOfEps, tbname, pTableMeta->uid);
code
=
rawBlockBindData
(
pQuery
,
pTableMeta
,
pData
,
NULL
,
fields
,
numFields
,
false
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
...
...
@@ -1726,10 +1726,15 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen)
tDecoderClear
(
&
decoderTmp
);
}
if
(
pCreateReqDst
)
{
SVgroupInfo
vg
;
code
=
catalogGetTableHashVgroup
(
pCatalog
,
&
conn
,
&
pName
,
&
vg
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
uError
(
"WriteRaw:catalogGetTableHashVgroup failed. table name: %s"
,
tbName
);
goto
end
;
}
if
(
pCreateReqDst
)
{
// change stable name to get meta
strcpy
(
pName
.
tname
,
pCreateReqDst
->
ctb
.
stbName
);
}
else
{
strcpy
(
pName
.
tname
,
tbName
);
}
code
=
catalogGetTableMeta
(
pCatalog
,
&
conn
,
&
pName
,
&
pTableMeta
);
if
(
code
==
TSDB_CODE_PAR_TABLE_NOT_EXIST
)
{
...
...
@@ -1742,13 +1747,6 @@ static int32_t tmqWriteRawMetaDataImpl(TAOS* taos, void* data, int32_t dataLen)
goto
end
;
}
SVgroupInfo
vg
;
code
=
catalogGetTableHashVgroup
(
pCatalog
,
&
conn
,
&
pName
,
&
vg
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
uError
(
"WriteRaw:catalogGetTableHashVgroup failed. table name: %s"
,
tbName
);
goto
end
;
}
if
(
pCreateReqDst
)
{
pTableMeta
->
vgId
=
vg
.
vgId
;
pTableMeta
->
uid
=
pCreateReqDst
->
uid
;
...
...
source/libs/parser/src/parInsertUtil.c
浏览文件 @
74c201bc
...
...
@@ -404,7 +404,7 @@ static int32_t createVgroupDataCxt(STableDataCxt* pTableCxt, SHashObj* pVgroupHa
int32_t
code
=
taosHashPut
(
pVgroupHash
,
&
pVgCxt
->
vgId
,
sizeof
(
pVgCxt
->
vgId
),
&
pVgCxt
,
POINTER_BYTES
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
taosArrayPush
(
pVgroupList
,
&
pVgCxt
);
uError
(
"td23101 2vgId:%d, uid:%"
PRIu64
,
pVgCxt
->
vgId
,
pTableCxt
->
pMeta
->
uid
);
// uDebug
("td23101 2vgId:%d, uid:%" PRIu64, pVgCxt->vgId, pTableCxt->pMeta->uid);
*
pOutput
=
pVgCxt
;
}
else
{
insDestroyVgroupDataCxt
(
pVgCxt
);
...
...
@@ -547,7 +547,7 @@ int32_t insBuildVgDataBlocks(SHashObj* pVgroupsHashObj, SArray* pVgDataCxtList,
if
(
TSDB_CODE_SUCCESS
==
code
)
{
dst
->
numOfTables
=
taosArrayGetSize
(
src
->
pData
->
aSubmitTbData
);
code
=
taosHashGetDup
(
pVgroupsHashObj
,
(
const
char
*
)
&
src
->
vgId
,
sizeof
(
src
->
vgId
),
&
dst
->
vg
);
uError
(
"td23101 3vgId:%d, numEps:%d"
,
src
->
vgId
,
dst
->
vg
.
epSet
.
numOfEps
);
//
uError("td23101 3vgId:%d, numEps:%d", src->vgId, dst->vg.epSet.numOfEps);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
buildSubmitReq
(
src
->
vgId
,
src
->
pData
,
&
dst
->
pData
,
&
dst
->
size
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录