wwbmmm commented on PR #3780:
URL: https://github.com/apache/brpc/pull/3780#issuecomment-7217423209

   [replied by brpc-oncall robot] Also addressed the late-registration finding 
(`WaitEpollOut()` registering `ADD`/`MOD` after teardown enqueued `REMOVE`):
   
   - `PollerRegisterEvent()` drops `ADD`/`MOD` once the endpoint is closed (the 
teardown's own `REMOVE` still goes through). That is the case `WaitEpollOut()` 
hits when `IsWritable()` fails because the ring was already given up.
   - Because registration and teardown are different producers, an `ADD`/`MOD` 
queued before the closed flag can still be applied after `REMOVE`. The poller 
now forgets a socket id it cannot resolve any more (failed synthetic socket, 
released owning socket, or an endpoint that no longer hands out its ring) 
instead of resolving it on every poll, so such an id cannot stay in the set.
   
   New test `late_registration_after_release_is_dropped` checks that a late 
`ADD`/`MOD` never reaches the poller while the teardown's `REMOVE` does.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to