chenBright commented on PR #3350:
URL: https://github.com/apache/brpc/pull/3350#issuecomment-4880420235

   > Fallback 天然优雅:
   PR 之前:手动 s->_read_buf.append(magic, MAGIC_STR_LEN) 把字节放回去
   PR 之后:ParseRdmaHandshake 返回 PARSE_ERROR_NOT_SAME,CutInputMessage 的 do-while 
循环自动尝试下一个 handler(baidu_std、http 等),零拷贝、无手动回退
   消除了 _state data race:不再需要 RdmaEndpoint::_state 来协调两个线程。协议分发的 preferred_index 
和 parsing_context 由 InputMessenger 统一管理,本身就是为并发安全设计的。
   
   同意,我也想到这两点了,所以注册服务端握手协议是很有价值的。


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