neondatabase / tokio-epoll-uring

Use io_uring from vanilla tokio.
36 stars 4 forks source link

investigate: slot leak? #57

Closed problame closed 1 week ago

problame commented 1 week ago
diff --git a/tokio-epoll-uring/src/system/slots.rs b/tokio-epoll-uring/src/system/slots.rs
index 0d857fa..ed200cf 100644
--- a/tokio-epoll-uring/src/system/slots.rs
+++ b/tokio-epoll-uring/src/system/slots.rs
@@ -313,6 +313,7 @@ impl SlotsInner {
                     trace!("waking up future");
                     waker.wake();
                 }
+                // not returning the slot here?!
             }
             Slot::PendingButFutureDropped {
                 _resources_owned_by_kernel,

https://github.com/neondatabase/tokio-epoll-uring/blob/ff31e19b50d4e559b4dfadaf1eba9f738afc23ad/tokio-epoll-uring/src/system/slots.rs#L307-L317

problame commented 1 week ago

Investigation proved (as far as a test can prove) that there are no slot leaks.

I added tests to document the current behavior: https://github.com/neondatabase/tokio-epoll-uring/pull/61

@yliang412 if you have time you could copy those tests to ensure we measure queue depth.