Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cd56e3b1
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看板
提交
cd56e3b1
编写于
6月 08, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
collect db table list
上级
9cfdf922
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
41 addition
and
43 deletion
+41
-43
include/util/taoserror.h
include/util/taoserror.h
+3
-3
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+1
-0
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+31
-36
source/libs/qcom/src/querymsg.c
source/libs/qcom/src/querymsg.c
+6
-4
未找到文件。
include/util/taoserror.h
浏览文件 @
cd56e3b1
...
...
@@ -339,9 +339,9 @@ int32_t* taosGetErrno();
#define TSDB_CODE_TDB_TAG_VER_OUT_OF_DATE TAOS_DEF_ERROR_CODE(0, 0x060D)
#define TSDB_CODE_TDB_TIMESTAMP_OUT_OF_RANGE TAOS_DEF_ERROR_CODE(0, 0x060E)
#define TSDB_CODE_TDB_SUBMIT_MSG_MSSED_UP TAOS_DEF_ERROR_CODE(0, 0x060F)
#define TSDB_CODE_TDB_INVALID_ACTION TAOS_DEF_ERROR_CODE(0, 0x06
0
0)
#define TSDB_CODE_TDB_INVALID_CREATE_TB_MSG TAOS_DEF_ERROR_CODE(0, 0x06
0
1)
#define TSDB_CODE_TDB_NO_TABLE_DATA_IN_MEM TAOS_DEF_ERROR_CODE(0, 0x06
0
2)
#define TSDB_CODE_TDB_INVALID_ACTION TAOS_DEF_ERROR_CODE(0, 0x06
1
0)
#define TSDB_CODE_TDB_INVALID_CREATE_TB_MSG TAOS_DEF_ERROR_CODE(0, 0x06
1
1)
#define TSDB_CODE_TDB_NO_TABLE_DATA_IN_MEM TAOS_DEF_ERROR_CODE(0, 0x06
1
2)
#define TSDB_CODE_TDB_FILE_ALREADY_EXISTS TAOS_DEF_ERROR_CODE(0, 0x0613)
#define TSDB_CODE_TDB_TABLE_RECONFIGURE TAOS_DEF_ERROR_CODE(0, 0x0614)
#define TSDB_CODE_TDB_IVD_CREATE_TABLE_INFO TAOS_DEF_ERROR_CODE(0, 0x0615)
...
...
source/client/src/clientImpl.c
浏览文件 @
cd56e3b1
...
...
@@ -593,6 +593,7 @@ void schedulerExecCb(SQueryResult* pResult, void* param, int32_t code) {
pRequest
->
code
=
code
;
}
tscDebug
(
"schedulerExecCb request type %s"
,
TMSG_INFO
(
pRequest
->
type
));
if
(
NEED_CLIENT_RM_TBLMETA_REQ
(
pRequest
->
type
))
{
removeMeta
(
pTscObj
,
pRequest
->
tableList
);
}
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
cd56e3b1
...
...
@@ -103,15 +103,14 @@ static int32_t collectUseTable(const SName* pName, SHashObj* pDbs) {
static
int32_t
getTableMetaImpl
(
STranslateContext
*
pCxt
,
const
SName
*
pName
,
STableMeta
**
pMeta
)
{
SParseContext
*
pParCxt
=
pCxt
->
pParseCxt
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
if
(
pParCxt
->
async
)
{
code
=
getTableMetaFromCache
(
pCxt
->
pMetaCache
,
pName
,
pMeta
);
}
else
{
code
=
collectUseDatabase
(
pName
,
pCxt
->
pDbs
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
collectUseTable
(
pName
,
pCxt
->
pTables
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
int32_t
code
=
collectUseDatabase
(
pName
,
pCxt
->
pDbs
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
collectUseTable
(
pName
,
pCxt
->
pTables
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
pParCxt
->
async
)
{
code
=
getTableMetaFromCache
(
pCxt
->
pMetaCache
,
pName
,
pMeta
);
}
else
{
code
=
catalogGetTableMeta
(
pParCxt
->
pCatalog
,
pParCxt
->
pTransporter
,
&
pParCxt
->
mgmtEpSet
,
pName
,
pMeta
);
}
}
...
...
@@ -150,12 +149,11 @@ static int32_t getDBVgInfoImpl(STranslateContext* pCxt, const SName* pName, SArr
SParseContext
*
pParCxt
=
pCxt
->
pParseCxt
;
char
fullDbName
[
TSDB_DB_FNAME_LEN
];
tNameGetFullDbName
(
pName
,
fullDbName
);
int32_t
code
=
TSDB_CODE_SUCCESS
;
if
(
pParCxt
->
async
)
{
code
=
getDbVgInfoFromCache
(
pCxt
->
pMetaCache
,
fullDbName
,
pVgInfo
);
}
else
{
code
=
collectUseDatabaseImpl
(
fullDbName
,
pCxt
->
pDbs
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
int32_t
code
=
collectUseDatabaseImpl
(
fullDbName
,
pCxt
->
pDbs
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
pParCxt
->
async
)
{
code
=
getDbVgInfoFromCache
(
pCxt
->
pMetaCache
,
fullDbName
,
pVgInfo
);
}
else
{
code
=
catalogGetDBVgInfo
(
pParCxt
->
pCatalog
,
pParCxt
->
pTransporter
,
&
pParCxt
->
mgmtEpSet
,
fullDbName
,
pVgInfo
);
}
}
...
...
@@ -175,15 +173,14 @@ static int32_t getDBVgInfo(STranslateContext* pCxt, const char* pDbName, SArray*
static
int32_t
getTableHashVgroupImpl
(
STranslateContext
*
pCxt
,
const
SName
*
pName
,
SVgroupInfo
*
pInfo
)
{
SParseContext
*
pParCxt
=
pCxt
->
pParseCxt
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
if
(
pParCxt
->
async
)
{
code
=
getTableVgroupFromCache
(
pCxt
->
pMetaCache
,
pName
,
pInfo
);
}
else
{
code
=
collectUseDatabase
(
pName
,
pCxt
->
pDbs
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
collectUseTable
(
pName
,
pCxt
->
pTables
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
int32_t
code
=
collectUseDatabase
(
pName
,
pCxt
->
pDbs
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
code
=
collectUseTable
(
pName
,
pCxt
->
pTables
);
}
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
pParCxt
->
async
)
{
code
=
getTableVgroupFromCache
(
pCxt
->
pMetaCache
,
pName
,
pInfo
);
}
else
{
code
=
catalogGetTableHashVgroup
(
pParCxt
->
pCatalog
,
pParCxt
->
pTransporter
,
&
pParCxt
->
mgmtEpSet
,
pName
,
pInfo
);
}
}
...
...
@@ -203,12 +200,11 @@ static int32_t getTableHashVgroup(STranslateContext* pCxt, const char* pDbName,
static
int32_t
getDBVgVersion
(
STranslateContext
*
pCxt
,
const
char
*
pDbFName
,
int32_t
*
pVersion
,
int64_t
*
pDbId
,
int32_t
*
pTableNum
)
{
SParseContext
*
pParCxt
=
pCxt
->
pParseCxt
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
if
(
pParCxt
->
async
)
{
code
=
getDbVgVersionFromCache
(
pCxt
->
pMetaCache
,
pDbFName
,
pVersion
,
pDbId
,
pTableNum
);
}
else
{
code
=
collectUseDatabaseImpl
(
pDbFName
,
pCxt
->
pDbs
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
int32_t
code
=
collectUseDatabaseImpl
(
pDbFName
,
pCxt
->
pDbs
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
pParCxt
->
async
)
{
code
=
getDbVgVersionFromCache
(
pCxt
->
pMetaCache
,
pDbFName
,
pVersion
,
pDbId
,
pTableNum
);
}
else
{
code
=
catalogGetDBVgVersion
(
pParCxt
->
pCatalog
,
pDbFName
,
pVersion
,
pDbId
,
pTableNum
);
}
}
...
...
@@ -224,12 +220,11 @@ static int32_t getDBCfg(STranslateContext* pCxt, const char* pDbName, SDbCfgInfo
tNameSetDbName
(
&
name
,
pCxt
->
pParseCxt
->
acctId
,
pDbName
,
strlen
(
pDbName
));
char
dbFname
[
TSDB_DB_FNAME_LEN
]
=
{
0
};
tNameGetFullDbName
(
&
name
,
dbFname
);
int32_t
code
=
TSDB_CODE_SUCCESS
;
if
(
pParCxt
->
async
)
{
code
=
getDbCfgFromCache
(
pCxt
->
pMetaCache
,
dbFname
,
pInfo
);
}
else
{
code
=
collectUseDatabaseImpl
(
dbFname
,
pCxt
->
pDbs
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
int32_t
code
=
collectUseDatabaseImpl
(
dbFname
,
pCxt
->
pDbs
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
pParCxt
->
async
)
{
code
=
getDbCfgFromCache
(
pCxt
->
pMetaCache
,
dbFname
,
pInfo
);
}
else
{
code
=
catalogGetDBCfg
(
pParCxt
->
pCatalog
,
pParCxt
->
pTransporter
,
&
pParCxt
->
mgmtEpSet
,
dbFname
,
pInfo
);
}
}
...
...
source/libs/qcom/src/querymsg.c
浏览文件 @
cd56e3b1
...
...
@@ -294,10 +294,6 @@ int32_t queryCreateTableMetaFromMsg(STableMetaRsp *msg, bool isStb, STableMeta *
pTableMeta
->
sversion
=
msg
->
sversion
;
pTableMeta
->
tversion
=
msg
->
tversion
;
if
(
isStb
)
{
qDebug
(
"stable %s meta returned, suid:%"
PRIx64
,
msg
->
stbName
,
pTableMeta
->
suid
);
}
pTableMeta
->
tableInfo
.
numOfTags
=
msg
->
numOfTags
;
pTableMeta
->
tableInfo
.
precision
=
msg
->
precision
;
pTableMeta
->
tableInfo
.
numOfColumns
=
msg
->
numOfColumns
;
...
...
@@ -308,6 +304,12 @@ int32_t queryCreateTableMetaFromMsg(STableMetaRsp *msg, bool isStb, STableMeta *
pTableMeta
->
tableInfo
.
rowSize
+=
pTableMeta
->
schema
[
i
].
bytes
;
}
qDebug
(
"table %s uid %"
PRIx64
" meta returned, type %d vgId %d db %s stb %s suid %"
PRIx64
" sver %d tver %d"
PRIx64
" tagNum %d colNum %d precision %d rowSize %d"
,
msg
->
tbName
,
pTableMeta
->
uid
,
pTableMeta
->
tableType
,
pTableMeta
->
vgId
,
msg
->
dbFName
,
msg
->
stbName
,
pTableMeta
->
suid
,
pTableMeta
->
sversion
,
pTableMeta
->
tversion
,
pTableMeta
->
tableInfo
.
numOfTags
,
pTableMeta
->
tableInfo
.
numOfColumns
,
pTableMeta
->
tableInfo
.
precision
,
pTableMeta
->
tableInfo
.
rowSize
);
*
pMeta
=
pTableMeta
;
return
TSDB_CODE_SUCCESS
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录