Skip to content

Commit 9ced156

Browse files
authored
docs: document that TraverseConnectionsOnThread may preempt (#574)
Add comment documenting that TraverseConnectionsOnThread can yield internally while waiting for active migrations to complete. We had a bug recently, so this is worth documenting. Signed-off-by: Gil Levkovich <69595609+glevkovich@users.noreply.github.com>
1 parent e8a8a0a commit 9ced156

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

util/listener_interface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class ListenerInterface {
6565
// traverses all client connection in current thread. cb must adhere to rules from
6666
// `TraverseConnections`. Specifically, cb should not fiber block so that the underlying
6767
// connection list won't change during the traversal.
68+
// Note: This function may preempt internally (e.g., waiting for active migrations to finish).
6869
Connection* TraverseConnectionsOnThread(TraverseCB cb, uint32_t limit, Connection* from);
6970

7071
// Must be called from the connection fiber (that runs HandleRequests() function).

0 commit comments

Comments
 (0)