Skip to content

Commit 8f273f3

Browse files
committed
fix: handle WouldBlock correctly in DeleteFileIndex
1 parent 20f1a13 commit 8f273f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/iceberg/src/delete_file_index.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::fmt::{self, Debug};
2020
use std::future::Future;
2121
use std::ops::Deref;
2222
use std::pin::Pin;
23-
use std::sync::{Arc, RwLock};
23+
use std::sync::{Arc, RwLock, TryLockError};
2424
use std::task::{Context, Poll};
2525

2626
use futures::StreamExt;
@@ -235,6 +235,10 @@ impl Future for DeletesForDataFile<'_> {
235235
Poll::Pending
236236
}
237237
},
238+
Err(TryLockError::WouldBlock) => {
239+
self.waker_set.insert(cx);
240+
Poll::Pending
241+
}
238242
Err(err) => Poll::Ready(Err(Error::new(ErrorKind::Unexpected, err.to_string()))),
239243
}
240244
}

0 commit comments

Comments
 (0)