Skip to content

Commit

Permalink
add doc and gen proto
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
  • Loading branch information
BugenZhao committed Mar 16, 2023
1 parent 22cbb79 commit 262bf00
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 6 deletions.
49 changes: 47 additions & 2 deletions dashboard/proto/gen/stream_plan.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions proto/stream_plan.proto
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ message StreamSource {
string source_name = 8;
}

message BarrierRecvNode {

}
// The executor only for receiving barrier from the meta service. It always resides in the leaves
// of the streaming graph.
message BarrierRecvNode {}

message SourceNode {
// The source node can contain either a stream source or nothing. So here we extract all
Expand Down
6 changes: 5 additions & 1 deletion src/stream/src/executor/barrier_recv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ use super::{
StreamExecutorError,
};

/// The executor only for receiving barrier from the meta service. It always resides in the leaves
/// of the streaming graph.
pub struct BarrierRecvExecutor {
_ctx: ActorContextRef,

identity: String,

/// The barrier receiver registered in the local barrier manager.
barrier_receiver: UnboundedReceiver<Barrier>,
}

Expand All @@ -53,6 +55,8 @@ impl Executor for BarrierRecvExecutor {
UnboundedReceiverStream::new(self.barrier_receiver)
.map(|barrier| Ok(Message::Barrier(barrier)))
.chain(futures::stream::once(async {
// We do not use the stream termination as the control message, and this line should
// never be reached in normal cases. So we just return an error here.
Err(StreamExecutorError::channel_closed("barrier receiver"))
}))
.boxed()
Expand Down

0 comments on commit 262bf00

Please sign in to comment.