jenrryyou commented on pull request #1516: URL: https://github.com/apache/incubator-brpc/pull/1516#issuecomment-966202414
> 测试过兼容性么? 新的server和老的client 以及老的server和新的client. 实际测试过的。下面简单说下现象和分析: 1. 老的server和新的client: server 在正常场景(没有拥堵,达到最大并发等情况)client 和 server行为都没有问题。在满足BUG复现条件的情况下,还是会报同样的错。因为老的 server 还是会把本来应该返回STRM数据帧(stream协议的协议头标示)错误返回了PRPC数据帧,如果刚好client在Single 模式下,同时该 stream 的host_socket 的preferred_index 被其他 Stream 改成了PROTOCOL_STREAMING_RPC,就会出现提到的『absolutely wrong message』报错。 2. 新的server和老的client:Server 在正常场景和异常场景 client和 server行为都没有问题。即使在BUG 复现条件下,新 Server 就算拥堵也会对 创建 stream的 RPC请求返回STRM数据帧。client 端在 Stream.cpp 文件的HandleRpcResponse方法里调用 ProcessRpcResponse方法,然后检查response_meta的error_code,就会读取到服务端的错误信息,把正确的报错"Connection to xxx is overcrowded"输出。所以MR 在ProcessRpcResponse方法里处理INVALID_STREAM_ID显得略多余。但这样处理突出了这个事实:返回的response_stream有可能出现 stream_id 为INVALID_STREAM_ID的情况,以后迭代的时候要基于这个事实考虑。 -- 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]
