Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
00acf452
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看板
提交
00acf452
编写于
7月 27, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(stream): remove option
上级
4c49d99a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
13 addition
and
5 deletion
+13
-5
include/libs/stream/tstream.h
include/libs/stream/tstream.h
+1
-1
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
+1
-1
source/dnode/mnode/impl/src/mndScheduler.c
source/dnode/mnode/impl/src/mndScheduler.c
+2
-0
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+1
-1
source/libs/stream/src/streamTask.c
source/libs/stream/src/streamTask.c
+2
-2
source/libs/wal/inc/walInt.h
source/libs/wal/inc/walInt.h
+6
-0
未找到文件。
include/libs/stream/tstream.h
浏览文件 @
00acf452
...
...
@@ -270,7 +270,7 @@ typedef struct SStreamTask {
int64_t
startVer
;
int64_t
checkpointVer
;
int64_t
processedVer
;
int32_t
numOfVgroups
;
//
int32_t numOfVgroups;
// children info
SArray
*
childEpInfo
;
// SArray<SStreamChildEpInfo*>
...
...
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
浏览文件 @
00acf452
...
...
@@ -89,7 +89,7 @@ static void vmProcessStreamQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) {
int32_t
code
=
vnodeProcessFetchMsg
(
pVnode
->
pImpl
,
pMsg
,
pInfo
);
if
(
code
!=
0
)
{
if
(
terrno
!=
0
)
code
=
terrno
;
dGError
(
"vgId:%d, msg:%p failed to stream since %s"
,
pVnode
->
vgId
,
pMsg
,
terrstr
());
dGError
(
"vgId:%d, msg:%p failed to
process
stream since %s"
,
pVnode
->
vgId
,
pMsg
,
terrstr
());
vmSendRsp
(
pMsg
,
code
);
}
...
...
source/dnode/mnode/impl/src/mndScheduler.c
浏览文件 @
00acf452
...
...
@@ -391,10 +391,12 @@ int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream) {
// exec
pInnerTask
->
execType
=
TASK_EXEC__PIPE
;
#if 0
SDbObj* pSourceDb = mndAcquireDb(pMnode, pStream->sourceDb);
ASSERT(pDbObj != NULL);
sdbRelease(pSdb, pSourceDb);
pInnerTask->numOfVgroups = pSourceDb->cfg.numOfVgroups;
#endif
if
(
tsSchedStreamToSnode
)
{
SSnodeObj
*
pSnode
=
mndSchedFetchOneSnode
(
pMnode
);
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
00acf452
...
...
@@ -653,7 +653,7 @@ int32_t tqProcessTaskDeployReq(STQ* pTq, char* msg, int32_t msgLen) {
}
else
{
SReadHandle
mgHandle
=
{
.
vnode
=
NULL
,
.
numOfVgroups
=
pTask
->
numOfVgroups
,
.
numOfVgroups
=
(
int32_t
)
taosArrayGetSize
(
pTask
->
childEpInfo
)
,
};
pTask
->
exec
.
executor
=
qCreateStreamExecTaskInfo
(
pTask
->
exec
.
qmsg
,
&
mgHandle
);
}
...
...
source/libs/stream/src/streamTask.c
浏览文件 @
00acf452
...
...
@@ -64,7 +64,7 @@ int32_t tEncodeSStreamTask(SEncoder* pEncoder, const SStreamTask* pTask) {
if
(
tEncodeI32
(
pEncoder
,
pTask
->
selfChildId
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pTask
->
nodeId
)
<
0
)
return
-
1
;
if
(
tEncodeSEpSet
(
pEncoder
,
&
pTask
->
epSet
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pTask
->
numOfVgroups
)
<
0
)
return
-
1
;
/*if (tEncodeI32(pEncoder, pTask->numOfVgroups) < 0) return -1;*/
int32_t
epSz
=
taosArrayGetSize
(
pTask
->
childEpInfo
);
if
(
tEncodeI32
(
pEncoder
,
epSz
)
<
0
)
return
-
1
;
...
...
@@ -119,7 +119,7 @@ int32_t tDecodeSStreamTask(SDecoder* pDecoder, SStreamTask* pTask) {
if
(
tDecodeI32
(
pDecoder
,
&
pTask
->
selfChildId
)
<
0
)
return
-
1
;
if
(
tDecodeI32
(
pDecoder
,
&
pTask
->
nodeId
)
<
0
)
return
-
1
;
if
(
tDecodeSEpSet
(
pDecoder
,
&
pTask
->
epSet
)
<
0
)
return
-
1
;
if
(
tDecodeI32
(
pDecoder
,
&
pTask
->
numOfVgroups
)
<
0
)
return
-
1
;
/*if (tDecodeI32(pDecoder, &pTask->numOfVgroups) < 0) return -1;*/
int32_t
epSz
;
if
(
tDecodeI32
(
pDecoder
,
&
epSz
)
<
0
)
return
-
1
;
...
...
source/libs/wal/inc/walInt.h
浏览文件 @
00acf452
...
...
@@ -61,26 +61,31 @@ static inline int32_t compareWalFileInfo(const void* pLeft, const void* pRight)
}
static
inline
int64_t
walGetLastFileSize
(
SWal
*
pWal
)
{
if
(
taosArrayGetSize
(
pWal
->
fileInfoSet
)
==
0
)
return
0
;
SWalFileInfo
*
pInfo
=
(
SWalFileInfo
*
)
taosArrayGetLast
(
pWal
->
fileInfoSet
);
return
pInfo
->
fileSize
;
}
static
inline
int64_t
walGetLastFileFirstVer
(
SWal
*
pWal
)
{
if
(
taosArrayGetSize
(
pWal
->
fileInfoSet
)
==
0
)
return
-
1
;
SWalFileInfo
*
pInfo
=
(
SWalFileInfo
*
)
taosArrayGetLast
(
pWal
->
fileInfoSet
);
return
pInfo
->
firstVer
;
}
static
inline
int64_t
walGetCurFileFirstVer
(
SWal
*
pWal
)
{
if
(
pWal
->
writeCur
==
-
1
)
return
-
1
;
SWalFileInfo
*
pInfo
=
(
SWalFileInfo
*
)
taosArrayGet
(
pWal
->
fileInfoSet
,
pWal
->
writeCur
);
return
pInfo
->
firstVer
;
}
static
inline
int64_t
walGetCurFileLastVer
(
SWal
*
pWal
)
{
if
(
pWal
->
writeCur
==
-
1
)
return
-
1
;
SWalFileInfo
*
pInfo
=
(
SWalFileInfo
*
)
taosArrayGet
(
pWal
->
fileInfoSet
,
pWal
->
writeCur
);
return
pInfo
->
firstVer
;
}
static
inline
int64_t
walGetCurFileOffset
(
SWal
*
pWal
)
{
if
(
pWal
->
writeCur
==
-
1
)
return
-
1
;
SWalFileInfo
*
pInfo
=
(
SWalFileInfo
*
)
taosArrayGet
(
pWal
->
fileInfoSet
,
pWal
->
writeCur
);
return
pInfo
->
fileSize
;
}
...
...
@@ -88,6 +93,7 @@ static inline int64_t walGetCurFileOffset(SWal* pWal) {
static
inline
bool
walCurFileClosed
(
SWal
*
pWal
)
{
return
taosArrayGetSize
(
pWal
->
fileInfoSet
)
!=
pWal
->
writeCur
;
}
static
inline
SWalFileInfo
*
walGetCurFileInfo
(
SWal
*
pWal
)
{
if
(
pWal
->
writeCur
==
-
1
)
return
NULL
;
return
(
SWalFileInfo
*
)
taosArrayGet
(
pWal
->
fileInfoSet
,
pWal
->
writeCur
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录