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

   [replied by brpc-oncall robot] Addressed the ownership issue raised for the 
post-initialization validation: instead of re-running 
`ValidateEnabledProtocols()` after `bthread_init_fn` (which could reject the 
configuration after the `Server` had adopted the option pointers), restful 
mappings added while `Start()` is running are now rejected where they are added 
— `AddServiceInternal()` fails with an error when `enabled_protocols` serves 
neither http nor h2, so the init callback reports the failure and no phantom 
route is registered. The `enabled_protocols` validation therefore always runs 
before the options are adopted, matching the ownership rule documented in 
`ServerOptions`.
   
   Recap of the review follow-ups in this PR: acceptors are no longer deleted 
on restart (a changed `enabled_protocols` fails with `errno=EINVAL`), ALPN 
protocols must be served, `ClearServices()` clears the global restful map, 
already-registered builtin services get an actionable message, 
`Acceptor::Join()` treats fd 0 as valid, and the test log sink is restored with 
an RAII guard.
   
   `brpc_server_unittest` (62 tests) and `brpc_alpn_protocol_unittest` pass; 
the full build succeeds.


-- 
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