Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
86b0dc98
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看板
提交
86b0dc98
编写于
11月 30, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' of
https://github.com/taosdata/TDengine
into refact/submit_req
上级
f67b5162
d4035e26
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
14 addition
and
25 deletion
+14
-25
cmake/taostools_CMakeLists.txt.in
cmake/taostools_CMakeLists.txt.in
+1
-1
include/util/tarray.h
include/util/tarray.h
+2
-13
source/dnode/mnode/impl/src/mndConsumer.c
source/dnode/mnode/impl/src/mndConsumer.c
+3
-2
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+1
-0
source/libs/stream/src/streamUpdate.c
source/libs/stream/src/streamUpdate.c
+6
-1
source/util/src/tarray.c
source/util/src/tarray.c
+1
-8
未找到文件。
cmake/taostools_CMakeLists.txt.in
浏览文件 @
86b0dc98
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# taos-tools
# taos-tools
ExternalProject_Add(taos-tools
ExternalProject_Add(taos-tools
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
GIT_TAG
b103d9b
GIT_TAG
5445810
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
BINARY_DIR ""
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
#BUILD_IN_SOURCE TRUE
...
...
include/util/tarray.h
浏览文件 @
86b0dc98
...
@@ -217,15 +217,10 @@ void taosArrayClear(SArray* pArray);
...
@@ -217,15 +217,10 @@ void taosArrayClear(SArray* pArray);
*/
*/
void
taosArrayClearEx
(
SArray
*
pArray
,
void
(
*
fp
)(
void
*
));
void
taosArrayClearEx
(
SArray
*
pArray
,
void
(
*
fp
)(
void
*
));
/**
* clear the array (remove all element)
* @param pArray
* @param fp
*/
void
taosArrayClearP
(
SArray
*
pArray
,
FDelete
fp
);
void
*
taosArrayDestroy
(
SArray
*
pArray
);
void
*
taosArrayDestroy
(
SArray
*
pArray
);
void
taosArrayDestroyP
(
SArray
*
pArray
,
FDelete
fp
);
void
taosArrayDestroyP
(
SArray
*
pArray
,
FDelete
fp
);
void
taosArrayDestroyEx
(
SArray
*
pArray
,
FDelete
fp
);
void
taosArrayDestroyEx
(
SArray
*
pArray
,
FDelete
fp
);
/**
/**
...
@@ -235,12 +230,6 @@ void taosArrayDestroyEx(SArray* pArray, FDelete fp);
...
@@ -235,12 +230,6 @@ void taosArrayDestroyEx(SArray* pArray, FDelete fp);
*/
*/
void
taosArraySort
(
SArray
*
pArray
,
__compar_fn_t
comparFn
);
void
taosArraySort
(
SArray
*
pArray
,
__compar_fn_t
comparFn
);
/**
* sort string array
* @param pArray
*/
void
taosArraySortString
(
SArray
*
pArray
,
__compar_fn_t
comparFn
);
/**
/**
* search the array
* search the array
* @param pArray
* @param pArray
...
...
source/dnode/mnode/impl/src/mndConsumer.c
浏览文件 @
86b0dc98
...
@@ -538,7 +538,7 @@ static int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
...
@@ -538,7 +538,7 @@ static int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
int32_t
code
=
-
1
;
int32_t
code
=
-
1
;
SArray
*
newSub
=
subscribe
.
topicNames
;
SArray
*
newSub
=
subscribe
.
topicNames
;
taosArraySort
String
(
newSub
,
taosArrayCompareString
);
taosArraySort
(
newSub
,
taosArrayCompareString
);
taosArrayRemoveDuplicateP
(
newSub
,
taosArrayCompareString
,
taosMemoryFree
);
taosArrayRemoveDuplicateP
(
newSub
,
taosArrayCompareString
,
taosMemoryFree
);
int32_t
newTopicNum
=
taosArrayGetSize
(
newSub
);
int32_t
newTopicNum
=
taosArrayGetSize
(
newSub
);
...
@@ -850,7 +850,8 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer,
...
@@ -850,7 +850,8 @@ static int32_t mndConsumerActionUpdate(SSdb *pSdb, SMqConsumerObj *pOldConsumer,
// add to current topic
// add to current topic
taosArrayPush
(
pOldConsumer
->
currentTopics
,
&
addedTopic
);
taosArrayPush
(
pOldConsumer
->
currentTopics
,
&
addedTopic
);
taosArraySortString
(
pOldConsumer
->
currentTopics
,
taosArrayCompareString
);
taosArraySort
(
pOldConsumer
->
currentTopics
,
taosArrayCompareString
);
// set status
// set status
if
(
taosArrayGetSize
(
pOldConsumer
->
rebNewTopics
)
==
0
&&
taosArrayGetSize
(
pOldConsumer
->
rebRemovedTopics
)
==
0
)
{
if
(
taosArrayGetSize
(
pOldConsumer
->
rebNewTopics
)
==
0
&&
taosArrayGetSize
(
pOldConsumer
->
rebRemovedTopics
)
==
0
)
{
if
(
pOldConsumer
->
status
==
MQ_CONSUMER_STATUS__MODIFY
||
if
(
pOldConsumer
->
status
==
MQ_CONSUMER_STATUS__MODIFY
||
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
86b0dc98
...
@@ -2542,6 +2542,7 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
...
@@ -2542,6 +2542,7 @@ int32_t initDelSkylineIterator(STableBlockScanInfo* pBlockScanInfo, STsdbReader*
goto
_err
;
goto
_err
;
}
}
// TODO: opt the perf of read del index
code
=
tsdbReadDelIdx
(
pDelFReader
,
aDelIdx
);
code
=
tsdbReadDelIdx
(
pDelFReader
,
aDelIdx
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
taosArrayDestroy
(
aDelIdx
);
taosArrayDestroy
(
aDelIdx
);
...
...
source/libs/stream/src/streamUpdate.c
浏览文件 @
86b0dc98
...
@@ -44,6 +44,11 @@ static void windowSBfAdd(SUpdateInfo *pInfo, uint64_t count) {
...
@@ -44,6 +44,11 @@ static void windowSBfAdd(SUpdateInfo *pInfo, uint64_t count) {
}
}
}
}
static
void
clearItemHelper
(
void
*
p
)
{
SScalableBf
**
pBf
=
p
;
tScalableBfDestroy
(
*
pBf
);
}
static
void
windowSBfDelete
(
SUpdateInfo
*
pInfo
,
uint64_t
count
)
{
static
void
windowSBfDelete
(
SUpdateInfo
*
pInfo
,
uint64_t
count
)
{
if
(
count
<
pInfo
->
numSBFs
)
{
if
(
count
<
pInfo
->
numSBFs
)
{
for
(
uint64_t
i
=
0
;
i
<
count
;
++
i
)
{
for
(
uint64_t
i
=
0
;
i
<
count
;
++
i
)
{
...
@@ -52,7 +57,7 @@ static void windowSBfDelete(SUpdateInfo *pInfo, uint64_t count) {
...
@@ -52,7 +57,7 @@ static void windowSBfDelete(SUpdateInfo *pInfo, uint64_t count) {
taosArrayRemove
(
pInfo
->
pTsSBFs
,
0
);
taosArrayRemove
(
pInfo
->
pTsSBFs
,
0
);
}
}
}
else
{
}
else
{
taosArrayClear
P
(
pInfo
->
pTsSBFs
,
(
FDelete
)
tScalableBfDestroy
);
taosArrayClear
Ex
(
pInfo
->
pTsSBFs
,
clearItemHelper
);
}
}
pInfo
->
minTS
+=
pInfo
->
interval
*
count
;
pInfo
->
minTS
+=
pInfo
->
interval
*
count
;
}
}
...
...
source/util/src/tarray.c
浏览文件 @
86b0dc98
...
@@ -415,9 +415,7 @@ void taosArrayDestroyEx(SArray* pArray, FDelete fp) {
...
@@ -415,9 +415,7 @@ void taosArrayDestroyEx(SArray* pArray, FDelete fp) {
}
}
void
taosArraySort
(
SArray
*
pArray
,
__compar_fn_t
compar
)
{
void
taosArraySort
(
SArray
*
pArray
,
__compar_fn_t
compar
)
{
assert
(
pArray
!=
NULL
);
ASSERT
(
pArray
!=
NULL
&&
compar
!=
NULL
);
assert
(
compar
!=
NULL
);
taosSort
(
pArray
->
pData
,
pArray
->
size
,
pArray
->
elemSize
,
compar
);
taosSort
(
pArray
->
pData
,
pArray
->
size
,
pArray
->
elemSize
,
compar
);
}
}
...
@@ -433,11 +431,6 @@ int32_t taosArraySearchIdx(const SArray* pArray, const void* key, __compar_fn_t
...
@@ -433,11 +431,6 @@ int32_t taosArraySearchIdx(const SArray* pArray, const void* key, __compar_fn_t
return
item
==
NULL
?
-
1
:
(
int32_t
)((
char
*
)
item
-
(
char
*
)
pArray
->
pData
)
/
pArray
->
elemSize
;
return
item
==
NULL
?
-
1
:
(
int32_t
)((
char
*
)
item
-
(
char
*
)
pArray
->
pData
)
/
pArray
->
elemSize
;
}
}
void
taosArraySortString
(
SArray
*
pArray
,
__compar_fn_t
comparFn
)
{
assert
(
pArray
!=
NULL
);
taosSort
(
pArray
->
pData
,
pArray
->
size
,
pArray
->
elemSize
,
comparFn
);
}
static
int32_t
taosArrayPartition
(
SArray
*
pArray
,
int32_t
i
,
int32_t
j
,
__ext_compar_fn_t
fn
,
const
void
*
userData
)
{
static
int32_t
taosArrayPartition
(
SArray
*
pArray
,
int32_t
i
,
int32_t
j
,
__ext_compar_fn_t
fn
,
const
void
*
userData
)
{
void
*
key
=
taosArrayGetP
(
pArray
,
i
);
void
*
key
=
taosArrayGetP
(
pArray
,
i
);
while
(
i
<
j
)
{
while
(
i
<
j
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录