jayshrivastava commented on code in PR #26534:
URL: https://github.com/apache/datafusion/pull/26534#discussion_r4352814808
##########
datafusion/physical-expr/src/expressions/dynamic_filters/mod.rs:
##########
@@ -349,20 +392,14 @@ impl DynamicFilterPhysicalExpr {
/// Waiters using [`Self::wait_complete`] will be notified.
pub fn mark_complete(&self) {
let mut current = self.inner.write();
- let current_generation = current.generation;
current.is_complete = true;
- drop(current);
-
- // Broadcast completion to all waiters
- let _ = self.state_watch.send(FilterState::Complete {
- generation: current_generation,
- });
+ self.state_watch.send_replace(current.state());
Review Comment:
I just didn't like that we were throwing away the error. I figured there's
no reason to not use `send_replace` instead. This way we buffer the update and
let potentially late-arriving watchers to read it.
I'm happy to go back to `send` though if you feel strongly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]