dhruvarya-db commented on code in PR #2859:
URL: https://github.com/apache/iceberg-rust/pull/2859#discussion_r3618325438
##########
crates/iceberg/src/arrow/delete_filter.rs:
##########
@@ -296,6 +301,38 @@ pub(crate) mod tests {
const FIELD_ID_POSITIONAL_DELETE_FILE_PATH: u64 = 2147483546;
const FIELD_ID_POSITIONAL_DELETE_POS: u64 = 2147483545;
+ // Regression test for the positional-delete lost-wakeup hang.
+ //
+ // Drives the real API through the losing interleaving: the loader fires
+ // `notify_waiters()` (via `finish_pos_del_load`) *before* the waiter
awaits the notifier
+ // handed back by `WaitFor`. `notify_waiters()` stores no permit, so this
only completes if
+ // the waiter's `Notified` was created before the signal. Because
`WaitFor` now carries an
+ // `OwnedNotified` created under the lock in `try_start_pos_del_load`, it
is; on the old
+ // `WaitFor(Arc<Notify>)` contract the waiter created its `Notified` too
late and hung.
+ #[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+ async fn wait_for_completes_when_load_finishes_before_await() {
Review Comment:
Updated
--
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]