Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5b6e928d
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看板
提交
5b6e928d
编写于
10月 13, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' of
https://github.com/taosdata/TDengine
into refact/code_format
上级
8a033aca
7f8d2ff5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
16 addition
and
10 deletion
+16
-10
include/libs/stream/streamState.h
include/libs/stream/streamState.h
+1
-1
source/dnode/mnode/impl/src/mndConsumer.c
source/dnode/mnode/impl/src/mndConsumer.c
+3
-1
source/dnode/mnode/impl/src/mndTopic.c
source/dnode/mnode/impl/src/mndTopic.c
+4
-3
source/dnode/vnode/src/sma/smaRollup.c
source/dnode/vnode/src/sma/smaRollup.c
+1
-1
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+2
-2
source/dnode/vnode/src/tq/tqMeta.c
source/dnode/vnode/src/tq/tqMeta.c
+1
-0
source/libs/stream/src/streamState.c
source/libs/stream/src/streamState.c
+4
-2
未找到文件。
include/libs/stream/streamState.h
浏览文件 @
5b6e928d
...
...
@@ -36,7 +36,7 @@ typedef struct {
int32_t
number
;
}
SStreamState
;
SStreamState
*
streamStateOpen
(
char
*
path
,
SStreamTask
*
pTask
,
bool
specPath
);
SStreamState
*
streamStateOpen
(
char
*
path
,
SStreamTask
*
pTask
,
bool
specPath
,
int32_t
szPage
,
int32_t
pages
);
void
streamStateClose
(
SStreamState
*
pState
);
int32_t
streamStateBegin
(
SStreamState
*
pState
);
int32_t
streamStateCommit
(
SStreamState
*
pState
);
...
...
source/dnode/mnode/impl/src/mndConsumer.c
浏览文件 @
5b6e928d
...
...
@@ -116,11 +116,13 @@ static int32_t mndProcessConsumerLostMsg(SRpcMsg *pMsg) {
if
(
mndSetConsumerCommitLogs
(
pMnode
,
pTrans
,
pConsumerNew
)
!=
0
)
goto
FAIL
;
if
(
mndTransPrepare
(
pMnode
,
pTrans
)
!=
0
)
goto
FAIL
;
mndTransDrop
(
pTrans
);
tDeleteSMqConsumerObj
(
pConsumerNew
);
taosMemoryFree
(
pConsumerNew
);
mndTransDrop
(
pTrans
);
return
0
;
FAIL:
tDeleteSMqConsumerObj
(
pConsumerNew
);
taosMemoryFree
(
pConsumerNew
);
mndTransDrop
(
pTrans
);
return
-
1
;
}
...
...
source/dnode/mnode/impl/src/mndTopic.c
浏览文件 @
5b6e928d
...
...
@@ -154,6 +154,8 @@ TOPIC_ENCODE_OVER:
SSdbRow
*
mndTopicActionDecode
(
SSdbRaw
*
pRaw
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
void
*
buf
=
NULL
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
goto
TOPIC_DECODE_OVER
;
...
...
@@ -215,17 +217,15 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) {
SDB_GET_INT32
(
pRaw
,
dataPos
,
&
len
,
TOPIC_DECODE_OVER
);
if
(
len
)
{
void
*
buf
=
taosMemoryMalloc
(
len
);
buf
=
taosMemoryMalloc
(
len
);
if
(
buf
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
TOPIC_DECODE_OVER
;
}
SDB_GET_BINARY
(
pRaw
,
dataPos
,
buf
,
len
,
TOPIC_DECODE_OVER
);
if
(
taosDecodeSSchemaWrapper
(
buf
,
&
pTopic
->
schema
)
==
NULL
)
{
taosMemoryFree
(
buf
);
goto
TOPIC_DECODE_OVER
;
}
taosMemoryFree
(
buf
);
}
else
{
pTopic
->
schema
.
nCols
=
0
;
pTopic
->
schema
.
version
=
0
;
...
...
@@ -251,6 +251,7 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) {
terrno
=
TSDB_CODE_SUCCESS
;
TOPIC_DECODE_OVER:
taosMemoryFreeClear
(
buf
);
if
(
terrno
!=
TSDB_CODE_SUCCESS
)
{
mError
(
"topic:%s, failed to decode from raw:%p since %s"
,
pTopic
->
name
,
pRaw
,
terrstr
());
taosMemoryFreeClear
(
pRow
);
...
...
source/dnode/vnode/src/sma/smaRollup.c
浏览文件 @
5b6e928d
...
...
@@ -321,7 +321,7 @@ static int32_t tdSetRSmaInfoItemParams(SSma *pSma, SRSmaParam *param, SRSmaStat
}
taosMemoryFree
(
s
);
}
pStreamState
=
streamStateOpen
(
taskInfDir
,
NULL
,
true
);
pStreamState
=
streamStateOpen
(
taskInfDir
,
NULL
,
true
,
-
1
,
-
1
);
if
(
!
pStreamState
)
{
terrno
=
TSDB_CODE_RSMA_STREAM_STATE_OPEN
;
return
TSDB_CODE_FAILED
;
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
5b6e928d
...
...
@@ -890,7 +890,7 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask) {
// expand executor
if
(
pTask
->
taskLevel
==
TASK_LEVEL__SOURCE
)
{
pTask
->
pState
=
streamStateOpen
(
pTq
->
pStreamMeta
->
path
,
pTask
,
false
);
pTask
->
pState
=
streamStateOpen
(
pTq
->
pStreamMeta
->
path
,
pTask
,
false
,
-
1
,
-
1
);
if
(
pTask
->
pState
==
NULL
)
{
return
-
1
;
}
...
...
@@ -904,7 +904,7 @@ int32_t tqExpandTask(STQ* pTq, SStreamTask* pTask) {
pTask
->
exec
.
executor
=
qCreateStreamExecTaskInfo
(
pTask
->
exec
.
qmsg
,
&
handle
);
ASSERT
(
pTask
->
exec
.
executor
);
}
else
if
(
pTask
->
taskLevel
==
TASK_LEVEL__AGG
)
{
pTask
->
pState
=
streamStateOpen
(
pTq
->
pStreamMeta
->
path
,
pTask
,
false
);
pTask
->
pState
=
streamStateOpen
(
pTq
->
pStreamMeta
->
path
,
pTask
,
false
,
-
1
,
-
1
);
if
(
pTask
->
pState
==
NULL
)
{
return
-
1
;
}
...
...
source/dnode/vnode/src/tq/tqMeta.c
浏览文件 @
5b6e928d
...
...
@@ -177,6 +177,7 @@ int32_t tqMetaRestoreCheckInfo(STQ* pTq) {
tDecoderClear
(
&
decoder
);
if
(
taosHashPut
(
pTq
->
pCheckInfo
,
info
.
topic
,
strlen
(
info
.
topic
),
&
info
,
sizeof
(
STqCheckInfo
))
<
0
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
tdbFree
(
pKey
);
tdbTbcClose
(
pCur
);
return
-
1
;
}
...
...
source/libs/stream/src/streamState.c
浏览文件 @
5b6e928d
...
...
@@ -49,7 +49,9 @@ static inline int stateKeyCmpr(const void* pKey1, int kLen1, const void* pKey2,
return
0
;
}
SStreamState
*
streamStateOpen
(
char
*
path
,
SStreamTask
*
pTask
,
bool
specPath
)
{
SStreamState
*
streamStateOpen
(
char
*
path
,
SStreamTask
*
pTask
,
bool
specPath
,
int32_t
szPage
,
int32_t
pages
)
{
szPage
=
szPage
<
0
?
4096
:
szPage
;
pages
=
pages
<
0
?
256
:
pages
;
SStreamState
*
pState
=
taosMemoryCalloc
(
1
,
sizeof
(
SStreamState
));
if
(
pState
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
...
...
@@ -63,7 +65,7 @@ SStreamState* streamStateOpen(char* path, SStreamTask* pTask, bool specPath) {
memset
(
statePath
,
0
,
300
);
strncpy
(
statePath
,
path
,
300
);
}
if
(
tdbOpen
(
statePath
,
4096
,
256
,
&
pState
->
db
)
<
0
)
{
if
(
tdbOpen
(
statePath
,
szPage
,
pages
,
&
pState
->
db
)
<
0
)
{
goto
_err
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录