Copilot commented on code in PR #3518:
URL: https://github.com/apache/brpc/pull/3518#discussion_r3926015319


##########
src/brpc/server.cpp:
##########
@@ -619,7 +620,7 @@ BUTIL_FORCE_INLINE bool is_rdma_handshake_protocol(const 
char* name) {
 }
 
 Acceptor* Server::BuildAcceptor() {
-    std::set<std::string> whitelist;
+    std::unordered_set<std::string> whitelist;

Review Comment:
   Switching `whitelist` from `std::set` to `std::unordered_set` makes the 
"unknown protocols" error message iteration order nondeterministic, which can 
make logs harder to diff/triage (and can introduce test flakiness if any code 
asserts on the text). Since this is only run during `Server::Start()`, keeping 
a `std::set` seems preferable for stable output.



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