Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
57383c9f
M
milvus
项目概览
milvus
/
milvus
12 个月 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
57383c9f
编写于
1月 21, 2022
作者:
X
xige-16
提交者:
GitHub
1月 21, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Delete Useless timetick channel (#15296)
Signed-off-by:
N
xige-16
<
xi.ge@zilliz.com
>
上级
a1e243b2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
58 deletion
+11
-58
internal/querynode/flow_graph_query_node.go
internal/querynode/flow_graph_query_node.go
+2
-2
internal/querynode/flow_graph_service_time_node.go
internal/querynode/flow_graph_service_time_node.go
+8
-49
internal/querynode/flow_graph_service_time_node_test.go
internal/querynode/flow_graph_service_time_node_test.go
+1
-7
未找到文件。
internal/querynode/flow_graph_query_node.go
浏览文件 @
57383c9f
...
...
@@ -60,7 +60,7 @@ func newQueryNodeFlowGraph(ctx context.Context,
var
dmStreamNode
node
=
q
.
newDmInputNode
(
ctx1
,
factory
)
var
filterDmNode
node
=
newFilteredDmNode
(
streamingReplica
,
collectionID
)
var
insertNode
node
=
newInsertNode
(
streamingReplica
)
var
serviceTimeNode
node
=
newServiceTimeNode
(
ctx1
,
tSafeReplica
,
collectionID
,
channel
,
factory
)
var
serviceTimeNode
node
=
newServiceTimeNode
(
ctx1
,
tSafeReplica
,
collectionID
,
channel
)
q
.
flowGraph
.
AddNode
(
dmStreamNode
)
q
.
flowGraph
.
AddNode
(
filterDmNode
)
...
...
@@ -127,7 +127,7 @@ func newQueryNodeDeltaFlowGraph(ctx context.Context,
var
dmStreamNode
node
=
q
.
newDmInputNode
(
ctx1
,
factory
)
var
filterDeleteNode
node
=
newFilteredDeleteNode
(
historicalReplica
,
collectionID
)
var
deleteNode
node
=
newDeleteNode
(
historicalReplica
)
var
serviceTimeNode
node
=
newServiceTimeNode
(
ctx1
,
tSafeReplica
,
collectionID
,
channel
,
factory
)
var
serviceTimeNode
node
=
newServiceTimeNode
(
ctx1
,
tSafeReplica
,
collectionID
,
channel
)
q
.
flowGraph
.
AddNode
(
dmStreamNode
)
q
.
flowGraph
.
AddNode
(
filterDeleteNode
)
...
...
internal/querynode/flow_graph_service_time_node.go
浏览文件 @
57383c9f
...
...
@@ -23,17 +23,15 @@ import (
"go.uber.org/zap"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/msgstream"
"github.com/milvus-io/milvus/internal/util/flowgraph"
)
// serviceTimeNode is one of the nodes in delta flow graph
type
serviceTimeNode
struct
{
baseNode
collectionID
UniqueID
vChannel
Channel
tSafeReplica
TSafeReplicaInterface
timeTickMsgStream
msgstream
.
MsgStream
collectionID
UniqueID
vChannel
Channel
tSafeReplica
TSafeReplicaInterface
}
// Name returns the name of serviceTimeNode
...
...
@@ -43,8 +41,6 @@ func (stNode *serviceTimeNode) Name() string {
// Close would close serviceTimeNode
func
(
stNode
*
serviceTimeNode
)
Close
()
{
// `Close` needs to be invoked to close producers
stNode
.
timeTickMsgStream
.
Close
()
}
// Operate handles input messages, to execute insert operations
...
...
@@ -83,40 +79,14 @@ func (stNode *serviceTimeNode) Operate(in []flowgraph.Msg) []flowgraph.Msg {
// zap.Any("channel", stNode.vChannel),
//)
//if err := stNode.sendTimeTick(serviceTimeMsg.timeRange.timestampMax); err != nil {
// log.Warn("Error: send time tick into pulsar channel failed", zap.Error(err))
//}
return
[]
Msg
{}
}
//func (stNode *serviceTimeNode) sendTimeTick(ts Timestamp) error {
// msgPack := msgstream.MsgPack{}
// timeTickMsg := msgstream.TimeTickMsg{
// BaseMsg: msgstream.BaseMsg{
// BeginTimestamp: ts,
// EndTimestamp: ts,
// HashValues: []uint32{0},
// },
// TimeTickMsg: internalpb.TimeTickMsg{
// Base: &commonpb.MsgBase{
// MsgType: commonpb.MsgType_TimeTick,
// MsgID: 0,
// Timestamp: ts,
// SourceID: Params.QueryNodeID,
// },
// },
// }
// msgPack.Msgs = append(msgPack.Msgs, &timeTickMsg)
// return stNode.timeTickMsgStream.Produce(&msgPack)
//}
// newServiceTimeNode returns a new serviceTimeNode
func
newServiceTimeNode
(
ctx
context
.
Context
,
tSafeReplica
TSafeReplicaInterface
,
collectionID
UniqueID
,
channel
Channel
,
factory
msgstream
.
Factory
)
*
serviceTimeNode
{
channel
Channel
)
*
serviceTimeNode
{
maxQueueLength
:=
Params
.
QueryNodeCfg
.
FlowGraphMaxQueueLength
maxParallelism
:=
Params
.
QueryNodeCfg
.
FlowGraphMaxParallelism
...
...
@@ -125,21 +95,10 @@ func newServiceTimeNode(ctx context.Context,
baseNode
.
SetMaxQueueLength
(
maxQueueLength
)
baseNode
.
SetMaxParallelism
(
maxParallelism
)
timeTimeMsgStream
,
err
:=
factory
.
NewMsgStream
(
ctx
)
if
err
!=
nil
{
log
.
Warn
(
err
.
Error
())
}
else
{
// TODO: use param table
timeTickChannel
:=
"query-node-time-tick-0"
timeTimeMsgStream
.
AsProducer
([]
string
{
timeTickChannel
})
log
.
Debug
(
"QueryNode serviceTimeNode AsProducer succeed"
,
zap
.
String
(
"channel name"
,
timeTickChannel
))
}
return
&
serviceTimeNode
{
baseNode
:
baseNode
,
collectionID
:
collectionID
,
vChannel
:
channel
,
tSafeReplica
:
tSafeReplica
,
timeTickMsgStream
:
timeTimeMsgStream
,
baseNode
:
baseNode
,
collectionID
:
collectionID
,
vChannel
:
channel
,
tSafeReplica
:
tSafeReplica
,
}
}
internal/querynode/flow_graph_service_time_node_test.go
浏览文件 @
57383c9f
...
...
@@ -20,8 +20,6 @@ import (
"context"
"testing"
"github.com/stretchr/testify/assert"
"github.com/milvus-io/milvus/internal/util/flowgraph"
)
...
...
@@ -33,14 +31,10 @@ func TestServiceTimeNode_Operate(t *testing.T) {
tSafe
:=
newTSafeReplica
()
tSafe
.
addTSafe
(
defaultDMLChannel
)
fac
,
err
:=
genFactory
()
assert
.
NoError
(
t
,
err
)
node
:=
newServiceTimeNode
(
ctx
,
tSafe
,
defaultCollectionID
,
defaultDMLChannel
,
fac
)
defaultDMLChannel
)
return
node
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录