From d720d5414ad8dd6e6c8712ad4c2948cc19b6fb81 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Thu, 18 Jul 2024 15:36:01 -0600 Subject: [PATCH] Review feedback --- edb/server/conn_pool/src/block.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/edb/server/conn_pool/src/block.rs b/edb/server/conn_pool/src/block.rs index 2fb27dc9719..374675e019f 100644 --- a/edb/server/conn_pool/src/block.rs +++ b/edb/server/conn_pool/src/block.rs @@ -277,6 +277,10 @@ impl Block { } /// Close one of idle connections in this block + /// + /// ## Panics + /// + /// If there are no idle connections, this function will panic. fn task_close_one(self: Rc, connector: &C) -> impl Future> { let conn = { consistency_check!(self); @@ -295,6 +299,11 @@ impl Block { } } + /// Steals a connection from one block to another. + /// + /// ## Panics + /// + /// If there are no idle connections, this function will panic. fn task_reconnect( from: Rc, to: Rc, @@ -326,6 +335,8 @@ impl Block { } } + /// Moves a connection to a different block than it was acquired from + /// without giving any wakers on the old block a chance to get it. fn task_reconnect_conn( from: Rc, to: Rc, @@ -359,6 +370,7 @@ impl Block { } } + /// Marks a connection as requiring re-open. fn task_reopen( self: Rc, conn: ConnHandle, @@ -378,6 +390,7 @@ impl Block { } } + /// Marks a connection as requiring a discard. fn task_discard( self: Rc, conn: ConnHandle,