JeonDaehong commented on code in PR #3435:
URL: https://github.com/apache/iceberg-rust/pull/3435#discussion_r4265147157
##########
crates/iceberg/src/arrow/delete_filter.rs:
##########
@@ -163,6 +200,29 @@ impl DeleteFilter {
}
}
+ /// Removes the `Loading` marker of a positional delete file whose load
failed or was
+ /// dropped, and wakes any waiting tasks so they can try the load again.
+ fn abandon_pos_del_load(&self, file_path: &str) {
+ let notify = {
+ let mut state = self.state.write().unwrap();
+ match state.positional_deletes.remove(file_path) {
+ Some(PosDelState::Loading(notify)) => Some(notify),
+ // Not ours to remove: keep whatever is there.
+ Some(other) => {
+ state
+ .positional_deletes
+ .insert(file_path.to_string(), other);
+ None
+ }
+ None => None,
+ }
+ };
+
+ if let Some(notify) = notify {
+ notify.notify_waiters();
+ }
+ }
Review Comment:
You're right, only the guard touches the entry once it's inserted. Applied
in 6532513c6.
--
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]