Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable setup of ConnectionEventCallback on RemoteAcceptor
Summary: # Issue Currently the `ConnectionEventCallback::onConnectionDequeuedByAcceptorCallback()` method is never called on `ThriftServer`, as `RemoteAcceptor` object is always initialized with `nullprt`. This blocks our ability to implement a Thrift counter which compares enqued and dequeued events to calculate current inflight connection count waiting in the queue. The reason of this issue is because on [ThriftServer::setup()](https://fburl.com/code/n3dyjy0t), we bind the port, which creates `AsyncServerSocket` and related `RemoteAcceptor` in the moment when `ConnectionEventCallback` is not initialized yet. The `ConnectionEventCallback` would only be set later on the `AsyncServerSocket` during setup process ([see here](https://fburl.com/code/bryagy6k)). There are no `dequeue` events in `thrift_connections_event` scuba, which makes me believe that logging those on the `RemoteAcceptor` never worked: https://fburl.com/scuba/thrift_connection_events/vu2kjvh5 # Fix Add ability to set `ConnectionEventCallback` in the `ServerBootstrap` class in Wangle and use that callback during address `bind()` process. Reviewed By: robertroeser Differential Revision: D64274597 fbshipit-source-id: fd9b7e0635b4f46678109c5b4b1786b163d8ab3b
- Loading branch information