Conversation
| match c.consume_collaborative(&mut self.producers, &mut read) { | ||
| result => { | ||
| self.did_work = true; | ||
| handle(result, &mut self.producers); | ||
| } | ||
| } |
There was a problem hiding this comment.
🔴 consume_with_dcache_collaborative unconditionally sets did_work = true and calls handler on Empty
The catch-all match pattern result => { self.did_work = true; handle(result, ...) } matches every variant including DCacheRead::Empty and DCacheRead::SpedPast. The previous version of this code (commit 48671fa) correctly filtered these out with DCacheRead::Empty => break and DCacheRead::SpedPast => {}. The fix commit (1aa4c05) correctly removed the loop (collaborative should consume one item at a time) but accidentally also removed the Empty/SpedPast filtering. This causes did_work to always be true, which affects the tile event loop metrics at crates/flux/src/tile/mod.rs:112, and passes Empty/SpedPast results to the handler callback that the old API never exposed.
| match c.consume_collaborative(&mut self.producers, &mut read) { | |
| result => { | |
| self.did_work = true; | |
| handle(result, &mut self.producers); | |
| } | |
| } | |
| match c.consume_collaborative(&mut self.producers, &mut read) { | |
| DCacheRead::Empty | DCacheRead::SpedPast => {} | |
| result => { | |
| self.did_work = true; | |
| handle(result, &mut self.producers); | |
| } | |
| } |
Was this helpful? React with 👍 or 👎 to provide feedback.
| match c.consume_collaborative_internal_message(&mut self.producers, &mut read) { | ||
| result => { | ||
| self.did_work = true; | ||
| handle(result, &mut self.producers); | ||
| } | ||
| } |
There was a problem hiding this comment.
🔴 consume_with_dcache_collaborative_internal_message unconditionally sets did_work = true and calls handler on Empty
Same issue as the sibling method: the catch-all match pattern always matches, including DCacheRead::Empty and DCacheRead::SpedPast. The previous version (commit 48671fa) correctly filtered these. This always marks did_work = true regardless of whether any message was consumed, and passes Empty/SpedPast to the handler callback.
| match c.consume_collaborative_internal_message(&mut self.producers, &mut read) { | |
| result => { | |
| self.did_work = true; | |
| handle(result, &mut self.producers); | |
| } | |
| } | |
| match c.consume_collaborative_internal_message(&mut self.producers, &mut read) { | |
| DCacheRead::Empty | DCacheRead::SpedPast => {} | |
| result => { | |
| self.did_work = true; | |
| handle(result, &mut self.producers); | |
| } | |
| } |
Was this helpful? React with 👍 or 👎 to provide feedback.
Uh oh!
There was an error while loading. Please reload this page.