From 27143c6095b6573e0aaf3e0c014cc783d33843de Mon Sep 17 00:00:00 2001 From: XuanYang-cn Date: Wed, 6 Oct 2021 22:51:58 +0800 Subject: [PATCH] [skip ci]Add comment on flowgraph ddNode (#9358) Signed-off-by: Yang Xuan --- internal/datanode/flow_graph_dd_node.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/internal/datanode/flow_graph_dd_node.go b/internal/datanode/flow_graph_dd_node.go index 8584a883b8..9eafc41193 100644 --- a/internal/datanode/flow_graph_dd_node.go +++ b/internal/datanode/flow_graph_dd_node.go @@ -25,6 +25,20 @@ import ( "github.com/opentracing/opentracing-go" ) +// ddNode filter messages from message streams. +// +// ddNode recives all the messages from message stream dml channels, including insert messages, +// delete messages and ddl messages like CreateCollectionMsg. +// +// ddNode filters insert messages according to the `flushedSegment` and `FilterThreshold`. +// If the timestamp of the insert message is earlier than `FilterThreshold`, ddNode will +// filter out the insert message for those who belong to `flushedSegment` +// +// When receiving a `DropCollection` message, ddNode will send a signal to DataNode `BackgroundGC` +// goroutinue, telling DataNode to release the resources of this perticular flow graph. +// +// After the filtering process, ddNode passes all the valid insert messages and delete message +// to the following flow graph node, which in DataNode is `insertBufferNode` type ddNode struct { BaseNode