Skip to content

Commit

Permalink
Improve naming of warning counter
Browse files Browse the repository at this point in the history
  • Loading branch information
haixuanTao committed Jan 14, 2025
1 parent f28ef75 commit 424a7c2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apis/rust/node/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub struct DoraNode {
cache: VecDeque<ShmemHandle>,

dataflow_descriptor: Descriptor,
warn_once: BTreeSet<DataId>,
warned_unknown_output: BTreeSet<DataId>,
}

impl DoraNode {
Expand Down Expand Up @@ -158,18 +158,18 @@ impl DoraNode {
drop_stream,
cache: VecDeque::new(),
dataflow_descriptor,
warn_once: BTreeSet::new(),
warned_unknown_output: BTreeSet::new(),
};
Ok((node, event_stream))
}

fn validate_output(&mut self, output_id: &DataId) -> bool {
if !self.node_config.outputs.contains(output_id) {
if self.warn_once.contains(output_id) {
if self.warned_unknown_output.contains(output_id) {
warn!("Output {output_id} is not part of the node's output list.");
self.warn_once.insert(output_id.clone());
self.warned_unknown_output.insert(output_id.clone());
} else {
self.warn_once.insert(output_id.clone());
self.warned_unknown_output.insert(output_id.clone());
}
false
} else {
Expand Down

0 comments on commit 424a7c2

Please sign in to comment.