Appends the provided updates to the remap collection at the next available minting IntoTime and updates this operator's in-memory state accordingly. If an attempt to mint bindings fails due to another process having raced and appended bindings concurrently then the current global upper will be returned as an error. This is the frontier that this operator must be synced to for a future append atte
(
&mut self,
updates: Vec<(FromTime, IntoTime, Diff)>,
new_upper: &Antichain<IntoTime>,
)
| 176 | /// the frontier that this operator must be synced to for a future append attempt to have any |
| 177 | /// chance of success. |
| 178 | async fn append_batch( |
| 179 | &mut self, |
| 180 | updates: Vec<(FromTime, IntoTime, Diff)>, |
| 181 | new_upper: &Antichain<IntoTime>, |
| 182 | ) -> Result<ReclockBatch<FromTime, IntoTime>, UpperMismatch<IntoTime>> { |
| 183 | match self |
| 184 | .remap_handle |
| 185 | .compare_and_append(updates, self.upper.clone(), new_upper.clone()) |
| 186 | .await |
| 187 | { |
| 188 | // We have successfully produced data in the remap collection so let's read back what |
| 189 | // we wrote to update our local state |
| 190 | Ok(()) => Ok(self.sync(new_upper.borrow()).await), |
| 191 | Err(mismatch) => Err(mismatch), |
| 192 | } |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | #[cfg(test)] |
no test coverage detected