Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
14ff088d
TDengine
项目概览
taosdata
/
TDengine
12 个月 前同步成功
通知
1180
Star
22014
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,发现更多精彩内容 >>
提交
14ff088d
编写于
5月 18, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' of
https://github.com/taosdata/TDengine
into feature/meta
上级
ef684076
016738bb
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
57 addition
and
24 deletion
+57
-24
contrib/CMakeLists.txt
contrib/CMakeLists.txt
+3
-3
source/client/src/clientStmt.c
source/client/src/clientStmt.c
+9
-5
source/dnode/mgmt/node_mgmt/src/dmNodes.c
source/dnode/mgmt/node_mgmt/src/dmNodes.c
+2
-1
source/libs/catalog/inc/catalogInt.h
source/libs/catalog/inc/catalogInt.h
+1
-0
source/libs/catalog/src/catalog.c
source/libs/catalog/src/catalog.c
+28
-1
source/libs/index/src/indexComm.c
source/libs/index/src/indexComm.c
+1
-1
source/libs/parser/src/parInsert.c
source/libs/parser/src/parInsert.c
+1
-0
source/libs/parser/src/parInsertData.c
source/libs/parser/src/parInsertData.c
+2
-2
source/libs/scheduler/src/scheduler.c
source/libs/scheduler/src/scheduler.c
+7
-6
tests/script/api/batchprepare.c
tests/script/api/batchprepare.c
+3
-5
未找到文件。
contrib/CMakeLists.txt
浏览文件 @
14ff088d
...
@@ -226,10 +226,10 @@ endif(${BUILD_WITH_NURAFT})
...
@@ -226,10 +226,10 @@ endif(${BUILD_WITH_NURAFT})
if
(
${
BUILD_PTHREAD
}
)
if
(
${
BUILD_PTHREAD
}
)
set
(
CMAKE_BUILD_TYPE release
)
set
(
CMAKE_BUILD_TYPE release
)
add_definitions
(
-DPTW32_STATIC_LIB
)
add_definitions
(
-DPTW32_STATIC_LIB
)
add_subdirectory
(
pthread
)
add_subdirectory
(
pthread
EXCLUDE_FROM_ALL
)
set_target_properties
(
libpthreadVC3 PROPERTIES OUTPUT_NAME pthread
)
set_target_properties
(
libpthreadVC3 PROPERTIES OUTPUT_NAME pthread
)
add_library
(
pthread
STATIC IMPORTED GLOBAL
)
add_library
(
pthread
INTERFACE
)
SET_PROPERTY
(
TARGET pthread PROPERTY IMPORTED_LOCATION
${
LIBRARY_OUTPUT_PATH
}
/pthread.lib
)
target_link_libraries
(
pthread INTERFACE libpthreadVC3
)
endif
()
endif
()
# iconv
# iconv
...
...
source/client/src/clientStmt.c
浏览文件 @
14ff088d
...
@@ -260,8 +260,8 @@ int32_t stmtCleanBindInfo(STscStmt* pStmt) {
...
@@ -260,8 +260,8 @@ int32_t stmtCleanBindInfo(STscStmt* pStmt) {
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
int32_t
stmtCleanExecInfo
(
STscStmt
*
pStmt
,
bool
keepTable
,
bool
freeRequest
)
{
int32_t
stmtCleanExecInfo
(
STscStmt
*
pStmt
,
bool
keepTable
,
bool
deepClean
)
{
if
(
STMT_TYPE_QUERY
!=
pStmt
->
sql
.
type
||
freeRequest
)
{
if
(
STMT_TYPE_QUERY
!=
pStmt
->
sql
.
type
||
deepClean
)
{
taos_free_result
(
pStmt
->
exec
.
pRequest
);
taos_free_result
(
pStmt
->
exec
.
pRequest
);
pStmt
->
exec
.
pRequest
=
NULL
;
pStmt
->
exec
.
pRequest
=
NULL
;
}
}
...
@@ -280,7 +280,11 @@ int32_t stmtCleanExecInfo(STscStmt* pStmt, bool keepTable, bool freeRequest) {
...
@@ -280,7 +280,11 @@ int32_t stmtCleanExecInfo(STscStmt* pStmt, bool keepTable, bool freeRequest) {
continue
;
continue
;
}
}
if
(
STMT_TYPE_MULTI_INSERT
==
pStmt
->
sql
.
type
)
{
qFreeStmtDataBlock
(
pBlocks
);
qFreeStmtDataBlock
(
pBlocks
);
}
else
{
qDestroyStmtDataBlock
(
pBlocks
);
}
taosHashRemove
(
pStmt
->
exec
.
pBlockHash
,
key
,
keyLen
);
taosHashRemove
(
pStmt
->
exec
.
pBlockHash
,
key
,
keyLen
);
pIter
=
taosHashIterate
(
pStmt
->
exec
.
pBlockHash
,
pIter
);
pIter
=
taosHashIterate
(
pStmt
->
exec
.
pBlockHash
,
pIter
);
...
@@ -320,11 +324,11 @@ int32_t stmtCleanSQLInfo(STscStmt* pStmt) {
...
@@ -320,11 +324,11 @@ int32_t stmtCleanSQLInfo(STscStmt* pStmt) {
taosHashCleanup
(
pStmt
->
sql
.
pTableCache
);
taosHashCleanup
(
pStmt
->
sql
.
pTableCache
);
pStmt
->
sql
.
pTableCache
=
NULL
;
pStmt
->
sql
.
pTableCache
=
NULL
;
memset
(
&
pStmt
->
sql
,
0
,
sizeof
(
pStmt
->
sql
));
STMT_ERR_RET
(
stmtCleanExecInfo
(
pStmt
,
false
,
true
));
STMT_ERR_RET
(
stmtCleanExecInfo
(
pStmt
,
false
,
true
));
STMT_ERR_RET
(
stmtCleanBindInfo
(
pStmt
));
STMT_ERR_RET
(
stmtCleanBindInfo
(
pStmt
));
memset
(
&
pStmt
->
sql
,
0
,
sizeof
(
pStmt
->
sql
));
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
...
source/dnode/mgmt/node_mgmt/src/dmNodes.c
浏览文件 @
14ff088d
...
@@ -58,6 +58,7 @@ static int32_t dmNewProc(SMgmtWrapper *pWrapper, EDndNodeType ntype) {
...
@@ -58,6 +58,7 @@ static int32_t dmNewProc(SMgmtWrapper *pWrapper, EDndNodeType ntype) {
return
-
1
;
return
-
1
;
}
}
taosIgnSignal
(
SIGCHLD
);
pWrapper
->
proc
.
pid
=
pid
;
pWrapper
->
proc
.
pid
=
pid
;
dInfo
(
"node:%s, continue running in new process:%d"
,
pWrapper
->
name
,
pid
);
dInfo
(
"node:%s, continue running in new process:%d"
,
pWrapper
->
name
,
pid
);
return
0
;
return
0
;
...
@@ -254,7 +255,7 @@ static void dmWatchNodes(SDnode *pDnode) {
...
@@ -254,7 +255,7 @@ static void dmWatchNodes(SDnode *pDnode) {
if
(
!
OnlyInParentProc
(
pWrapper
))
continue
;
if
(
!
OnlyInParentProc
(
pWrapper
))
continue
;
if
(
proc
->
pid
<=
0
||
!
taosProcExist
(
proc
->
pid
))
{
if
(
proc
->
pid
<=
0
||
!
taosProcExist
(
proc
->
pid
))
{
d
Warn
(
"node:%s, process:%d is killed and needs to restart"
,
pWrapper
->
name
,
proc
->
pid
);
d
Error
(
"node:%s, process:%d is killed and needs to restart"
,
pWrapper
->
name
,
proc
->
pid
);
dmCloseProcRpcHandles
(
&
pWrapper
->
proc
);
dmCloseProcRpcHandles
(
&
pWrapper
->
proc
);
dmNewProc
(
pWrapper
,
ntype
);
dmNewProc
(
pWrapper
,
ntype
);
}
}
...
...
source/libs/catalog/inc/catalogInt.h
浏览文件 @
14ff088d
...
@@ -131,6 +131,7 @@ typedef struct SCtgCacheStat {
...
@@ -131,6 +131,7 @@ typedef struct SCtgCacheStat {
uint64_t
dbNum
;
uint64_t
dbNum
;
uint64_t
tblNum
;
uint64_t
tblNum
;
uint64_t
stblNum
;
uint64_t
stblNum
;
uint64_t
userNum
;
uint64_t
vgHitNum
;
uint64_t
vgHitNum
;
uint64_t
vgMissNum
;
uint64_t
vgMissNum
;
uint64_t
tblHitNum
;
uint64_t
tblHitNum
;
...
...
source/libs/catalog/src/catalog.c
浏览文件 @
14ff088d
...
@@ -122,6 +122,11 @@ void ctgFreeDbCache(SCtgDBCache *dbCache) {
...
@@ -122,6 +122,11 @@ void ctgFreeDbCache(SCtgDBCache *dbCache) {
ctgFreeTableMetaCache
(
&
dbCache
->
tbCache
);
ctgFreeTableMetaCache
(
&
dbCache
->
tbCache
);
}
}
void
ctgFreeSCtgUserAuth
(
SCtgUserAuth
*
userCache
)
{
taosHashCleanup
(
userCache
->
createdDbs
);
taosHashCleanup
(
userCache
->
readDbs
);
taosHashCleanup
(
userCache
->
writeDbs
);
}
void
ctgFreeHandle
(
SCatalog
*
pCtg
)
{
void
ctgFreeHandle
(
SCatalog
*
pCtg
)
{
ctgFreeMetaRent
(
&
pCtg
->
dbRent
);
ctgFreeMetaRent
(
&
pCtg
->
dbRent
);
...
@@ -146,6 +151,23 @@ void ctgFreeHandle(SCatalog* pCtg) {
...
@@ -146,6 +151,23 @@ void ctgFreeHandle(SCatalog* pCtg) {
CTG_CACHE_STAT_SUB
(
dbNum
,
dbNum
);
CTG_CACHE_STAT_SUB
(
dbNum
,
dbNum
);
}
}
if
(
pCtg
->
userCache
)
{
int32_t
userNum
=
taosHashGetSize
(
pCtg
->
userCache
);
void
*
pIter
=
taosHashIterate
(
pCtg
->
userCache
,
NULL
);
while
(
pIter
)
{
SCtgUserAuth
*
userCache
=
pIter
;
ctgFreeSCtgUserAuth
(
userCache
);
pIter
=
taosHashIterate
(
pCtg
->
userCache
,
pIter
);
}
taosHashCleanup
(
pCtg
->
userCache
);
CTG_CACHE_STAT_SUB
(
userNum
,
userNum
);
}
taosMemoryFree
(
pCtg
);
taosMemoryFree
(
pCtg
);
}
}
...
@@ -2032,9 +2054,12 @@ int32_t ctgGetTableMeta(SCatalog* pCtg, void *pRpc, const SEpSet* pMgmtEps, cons
...
@@ -2032,9 +2054,12 @@ int32_t ctgGetTableMeta(SCatalog* pCtg, void *pRpc, const SEpSet* pMgmtEps, cons
SName
stbName
=
*
pTableName
;
SName
stbName
=
*
pTableName
;
strcpy
(
stbName
.
tname
,
output
->
tbName
);
strcpy
(
stbName
.
tname
,
output
->
tbName
);
taosMemoryFreeClear
(
output
->
tbMeta
);
CTG_ERR_JRET
(
ctgGetTableMetaFromCache
(
pCtg
,
&
stbName
,
pTableMeta
,
&
inCache
,
flag
,
NULL
));
CTG_ERR_JRET
(
ctgGetTableMetaFromCache
(
pCtg
,
&
stbName
,
pTableMeta
,
&
inCache
,
flag
,
NULL
));
if
(
!
inCache
)
{
if
(
!
inCache
)
{
ctgDebug
(
"stb no longer exist, dbFName:%s, tbName:%s"
,
output
->
dbFName
,
pTableName
->
tname
);
ctgDebug
(
"stb no longer exist, dbFName:%s, tbName:%s"
,
output
->
dbFName
,
pTableName
->
tname
);
continue
;
continue
;
}
}
...
@@ -2306,6 +2331,8 @@ int32_t ctgActUpdateUser(SCtgMetaAction *action) {
...
@@ -2306,6 +2331,8 @@ int32_t ctgActUpdateUser(SCtgMetaAction *action) {
CTG_ERR_JRET
(
TSDB_CODE_OUT_OF_MEMORY
);
CTG_ERR_JRET
(
TSDB_CODE_OUT_OF_MEMORY
);
}
}
taosMemoryFreeClear
(
msg
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
...
source/libs/index/src/indexComm.c
浏览文件 @
14ff088d
...
@@ -361,7 +361,7 @@ int32_t indexConvertDataToStr(void* src, int8_t type, void** dst) {
...
@@ -361,7 +361,7 @@ int32_t indexConvertDataToStr(void* src, int8_t type, void** dst) {
tlen
=
taosEncodeBinary
(
NULL
,
varDataVal
(
src
),
varDataLen
(
src
));
tlen
=
taosEncodeBinary
(
NULL
,
varDataVal
(
src
),
varDataLen
(
src
));
*
dst
=
taosMemoryCalloc
(
1
,
tlen
+
1
);
*
dst
=
taosMemoryCalloc
(
1
,
tlen
+
1
);
tlen
=
taosEncodeBinary
(
dst
,
varDataVal
(
src
),
varDataLen
(
src
));
tlen
=
taosEncodeBinary
(
dst
,
varDataVal
(
src
),
varDataLen
(
src
));
*
dst
=
*
dst
-
tlen
;
*
dst
=
(
char
*
)
*
dst
-
tlen
;
break
;
break
;
}
}
case
TSDB_DATA_TYPE_VARCHAR
:
{
// TSDB_DATA_TYPE_BINARY
case
TSDB_DATA_TYPE_VARCHAR
:
{
// TSDB_DATA_TYPE_BINARY
...
...
source/libs/parser/src/parInsert.c
浏览文件 @
14ff088d
...
@@ -1045,6 +1045,7 @@ static void destroyInsertParseContext(SInsertParseContext* pCxt) {
...
@@ -1045,6 +1045,7 @@ static void destroyInsertParseContext(SInsertParseContext* pCxt) {
destroyInsertParseContextForTable
(
pCxt
);
destroyInsertParseContextForTable
(
pCxt
);
taosHashCleanup
(
pCxt
->
pVgroupsHashObj
);
taosHashCleanup
(
pCxt
->
pVgroupsHashObj
);
taosHashCleanup
(
pCxt
->
pSubTableHashObj
);
taosHashCleanup
(
pCxt
->
pSubTableHashObj
);
taosHashCleanup
(
pCxt
->
pTableNameHashObj
);
destroyBlockHashmap
(
pCxt
->
pTableBlockHashObj
);
destroyBlockHashmap
(
pCxt
->
pTableBlockHashObj
);
destroyBlockArrayList
(
pCxt
->
pVgDataBlocks
);
destroyBlockArrayList
(
pCxt
->
pVgDataBlocks
);
...
...
source/libs/parser/src/parInsertData.c
浏览文件 @
14ff088d
...
@@ -235,12 +235,12 @@ static void destroyDataBlock(STableDataBlocks* pDataBlock) {
...
@@ -235,12 +235,12 @@ static void destroyDataBlock(STableDataBlocks* pDataBlock) {
}
}
taosMemoryFreeClear
(
pDataBlock
->
pData
);
taosMemoryFreeClear
(
pDataBlock
->
pData
);
if
(
!
pDataBlock
->
cloned
)
{
//
if (!pDataBlock->cloned) {
// free the refcount for metermeta
// free the refcount for metermeta
taosMemoryFreeClear
(
pDataBlock
->
pTableMeta
);
taosMemoryFreeClear
(
pDataBlock
->
pTableMeta
);
destroyBoundColumnInfo
(
&
pDataBlock
->
boundColumnInfo
);
destroyBoundColumnInfo
(
&
pDataBlock
->
boundColumnInfo
);
}
//
}
taosMemoryFreeClear
(
pDataBlock
);
taosMemoryFreeClear
(
pDataBlock
);
}
}
...
...
source/libs/scheduler/src/scheduler.c
浏览文件 @
14ff088d
...
@@ -1438,24 +1438,24 @@ int32_t schHandleDropCallback(void *param, const SDataBuf *pMsg, int32_t code) {
...
@@ -1438,24 +1438,24 @@ int32_t schHandleDropCallback(void *param, const SDataBuf *pMsg, int32_t code) {
}
}
int32_t
schHandleHbCallback
(
void
*
param
,
const
SDataBuf
*
pMsg
,
int32_t
code
)
{
int32_t
schHandleHbCallback
(
void
*
param
,
const
SDataBuf
*
pMsg
,
int32_t
code
)
{
SSchedulerHbRsp
rsp
=
{
0
};
SSchTaskCallbackParam
*
pParam
=
(
SSchTaskCallbackParam
*
)
param
;
if
(
code
)
{
if
(
code
)
{
qError
(
"hb rsp error:%s"
,
tstrerror
(
code
));
qError
(
"hb rsp error:%s"
,
tstrerror
(
code
));
SCH_ERR_RET
(
code
);
SCH_ERR_
J
RET
(
code
);
}
}
SSchedulerHbRsp
rsp
=
{
0
};
if
(
tDeserializeSSchedulerHbRsp
(
pMsg
->
pData
,
pMsg
->
len
,
&
rsp
))
{
if
(
tDeserializeSSchedulerHbRsp
(
pMsg
->
pData
,
pMsg
->
len
,
&
rsp
))
{
qError
(
"invalid hb rsp msg, size:%d"
,
pMsg
->
len
);
qError
(
"invalid hb rsp msg, size:%d"
,
pMsg
->
len
);
SCH_ERR_RET
(
TSDB_CODE_QRY_INVALID_INPUT
);
SCH_ERR_
J
RET
(
TSDB_CODE_QRY_INVALID_INPUT
);
}
}
SSchTaskCallbackParam
*
pParam
=
(
SSchTaskCallbackParam
*
)
param
;
SSchTrans
trans
=
{
0
};
SSchTrans
trans
=
{
0
};
trans
.
transInst
=
pParam
->
transport
;
trans
.
transInst
=
pParam
->
transport
;
trans
.
transHandle
=
pMsg
->
handle
;
trans
.
transHandle
=
pMsg
->
handle
;
SCH_ERR_RET
(
schUpdateHbConnection
(
&
rsp
.
epId
,
&
trans
));
SCH_ERR_
J
RET
(
schUpdateHbConnection
(
&
rsp
.
epId
,
&
trans
));
int32_t
taskNum
=
(
int32_t
)
taosArrayGetSize
(
rsp
.
taskStatus
);
int32_t
taskNum
=
(
int32_t
)
taosArrayGetSize
(
rsp
.
taskStatus
);
qDebug
(
"%d task status in hb rsp, nodeId:%d, fqdn:%s, port:%d"
,
taskNum
,
rsp
.
epId
.
nodeId
,
rsp
.
epId
.
ep
.
fqdn
,
qDebug
(
"%d task status in hb rsp, nodeId:%d, fqdn:%s, port:%d"
,
taskNum
,
rsp
.
epId
.
nodeId
,
rsp
.
epId
.
ep
.
fqdn
,
...
@@ -1483,6 +1483,7 @@ int32_t schHandleHbCallback(void *param, const SDataBuf *pMsg, int32_t code) {
...
@@ -1483,6 +1483,7 @@ int32_t schHandleHbCallback(void *param, const SDataBuf *pMsg, int32_t code) {
_return:
_return:
tFreeSSchedulerHbRsp
(
&
rsp
);
tFreeSSchedulerHbRsp
(
&
rsp
);
taosMemoryFree
(
param
);
SCH_RET
(
code
);
SCH_RET
(
code
);
}
}
...
...
tests/script/api/batchprepare.c
浏览文件 @
14ff088d
...
@@ -251,16 +251,12 @@ CaseCtrl gCaseCtrl = {
...
@@ -251,16 +251,12 @@ CaseCtrl gCaseCtrl = {
.bindColNum = 0,
.bindColNum = 0,
.bindTagNum = 0,
.bindTagNum = 0,
.bindRowNum = 0,
.bindRowNum = 0,
.bindColTypeNum = tListLen(bindColTypeList),
.bindColTypeList = bindColTypeList,
.bindTagTypeNum = 0,
.bindTagTypeNum = 0,
.bindTagTypeList = NULL,
.bindTagTypeList = NULL,
.optrIdxListNum = tListLen(optrIdxList),
.optrIdxList = optrIdxList,
.checkParamNum = false,
.checkParamNum = false,
.printRes = false,
.printRes = false,
.runTimes = 0,
.runTimes = 0,
.caseIdx =
23
,
.caseIdx =
1
,
.caseNum = 1,
.caseNum = 1,
.caseRunIdx = -1,
.caseRunIdx = -1,
.caseRunNum = 1,
.caseRunNum = 1,
...
@@ -1101,7 +1097,9 @@ void destroyData(BindData *data) {
...
@@ -1101,7 +1097,9 @@ void destroyData(BindData *data) {
taosMemoryFree
(
data
->
binaryLen
);
taosMemoryFree
(
data
->
binaryLen
);
taosMemoryFree
(
data
->
isNull
);
taosMemoryFree
(
data
->
isNull
);
taosMemoryFree
(
data
->
pBind
);
taosMemoryFree
(
data
->
pBind
);
taosMemoryFree
(
data
->
pTags
);
taosMemoryFree
(
data
->
colTypes
);
taosMemoryFree
(
data
->
colTypes
);
taosMemoryFree
(
data
->
sql
);
}
}
void
bpFetchRows
(
TAOS_RES
*
result
,
bool
printr
,
int32_t
*
rows
)
{
void
bpFetchRows
(
TAOS_RES
*
result
,
bool
printr
,
int32_t
*
rows
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录