Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
7c3e84b7
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7c3e84b7
编写于
8月 03, 2021
作者:
Y
yihaoDeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-4199]<feature> enhance performance
上级
93245c12
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
11 deletion
+9
-11
src/client/src/tscServer.c
src/client/src/tscServer.c
+3
-7
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+6
-4
未找到文件。
src/client/src/tscServer.c
浏览文件 @
7c3e84b7
...
@@ -2844,15 +2844,11 @@ int32_t tscGetTableMetaImpl(SSqlObj* pSql, STableMetaInfo *pTableMetaInfo, bool
...
@@ -2844,15 +2844,11 @@ int32_t tscGetTableMetaImpl(SSqlObj* pSql, STableMetaInfo *pTableMetaInfo, bool
tNameExtractFullName
(
&
pTableMetaInfo
->
name
,
name
);
tNameExtractFullName
(
&
pTableMetaInfo
->
name
,
name
);
size_t
len
=
strlen
(
name
);
size_t
len
=
strlen
(
name
);
if
(
pTableMetaInfo
->
tableMetaCapacity
!=
0
)
{
memset
(
pTableMetaInfo
->
pTableMeta
,
0
,
pTableMetaInfo
->
tableMetaCapacity
);
}
taosHashGetCloneExt
(
tscTableMetaMap
,
name
,
len
,
NULL
,
(
void
**
)
&
(
pTableMetaInfo
->
pTableMeta
),
&
pTableMetaInfo
->
tableMetaCapacity
);
taosHashGetCloneExt
(
tscTableMetaMap
,
name
,
len
,
NULL
,
(
void
**
)
&
(
pTableMetaInfo
->
pTableMeta
),
&
pTableMetaInfo
->
tableMetaCapacity
);
// TODO resize the tableMeta
//assert(size < 80 * TSDB_MAX_COLUMNS);
//if (!pSql->pBuf) {
// if (NULL == (pSql->pBuf = tcalloc(1, 80 * TSDB_MAX_COLUMNS))) {
// return TSDB_CODE_TSC_OUT_OF_MEMORY;
// }
//}
STableMeta
*
pMeta
=
pTableMetaInfo
->
pTableMeta
;
STableMeta
*
pMeta
=
pTableMetaInfo
->
pTableMeta
;
if
(
pMeta
&&
pMeta
->
id
.
uid
>
0
)
{
if
(
pMeta
&&
pMeta
->
id
.
uid
>
0
)
{
// in case of child table, here only get the
// in case of child table, here only get the
...
...
src/client/src/tscUtil.c
浏览文件 @
7c3e84b7
...
@@ -4460,17 +4460,19 @@ int32_t tscCreateTableMetaFromSTableMeta(STableMeta** ppChild, const char* name,
...
@@ -4460,17 +4460,19 @@ int32_t tscCreateTableMetaFromSTableMeta(STableMeta** ppChild, const char* name,
// tableMeta exists, build child table meta according to the super table meta
// tableMeta exists, build child table meta according to the super table meta
// the uid need to be checked in addition to the general name of the super table.
// the uid need to be checked in addition to the general name of the super table.
if
(
p
&&
p
->
id
.
uid
>
0
&&
pChild
->
suid
==
p
->
id
.
uid
)
{
if
(
p
&&
p
->
id
.
uid
>
0
&&
pChild
->
suid
==
p
->
id
.
uid
)
{
pChild
->
sversion
=
p
->
sversion
;
pChild
->
tversion
=
p
->
tversion
;
memcpy
(
&
pChild
->
tableInfo
,
&
p
->
tableInfo
,
sizeof
(
STableComInfo
));
int32_t
totalBytes
=
(
p
->
tableInfo
.
numOfColumns
+
p
->
tableInfo
.
numOfTags
)
*
sizeof
(
SSchema
);
int32_t
totalBytes
=
(
pChild
->
tableInfo
.
numOfColumns
+
pChild
->
tableInfo
.
numOfTags
)
*
sizeof
(
SSchema
);
int32_t
tableMetaSize
=
sizeof
(
STableMeta
)
+
totalBytes
;
int32_t
tableMetaSize
=
sizeof
(
STableMeta
)
+
totalBytes
;
if
(
*
tableMetaCapacity
<
tableMetaSize
)
{
if
(
*
tableMetaCapacity
<
tableMetaSize
)
{
pChild
=
realloc
(
pChild
,
tableMetaSize
);
pChild
=
realloc
(
pChild
,
tableMetaSize
);
*
tableMetaCapacity
=
(
size_t
)
tableMetaSize
;
*
tableMetaCapacity
=
(
size_t
)
tableMetaSize
;
}
}
pChild
->
sversion
=
p
->
sversion
;
pChild
->
tversion
=
p
->
tversion
;
memcpy
(
&
pChild
->
tableInfo
,
&
p
->
tableInfo
,
sizeof
(
STableComInfo
));
memcpy
(
pChild
->
schema
,
p
->
schema
,
totalBytes
);
memcpy
(
pChild
->
schema
,
p
->
schema
,
totalBytes
);
*
ppChild
=
pChild
;
*
ppChild
=
pChild
;
tfree
(
p
);
tfree
(
p
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录