zrlw edited a comment on issue #9210:
URL: https://github.com/apache/dubbo/issues/9210#issuecomment-962615219


   再说一下this.connectivityCheckFuture被创建的新任务重新赋值的问题:
   checkConnectivity异步创建的任务在结束前判断是否有新task,如果有就再次调用checkConnectivity:
   1. this.connectivityCheckFuture在checkConnectivity方法返回调用者之后又被更新,调用者并不知情;
   2. 调用者在旧的connectivityCheckFuture上等待的结果就是新task未执行完,调用者就继续执行后面的代码,然后出问题,比如:
   https://github.com/apache/dubbo/runs/4130565263?check_suite_focus=true
   ```
   2021-11-07T11:46:56.1815610Z [ERROR] Tests run: 3, Failures: 1, Errors: 0, 
Skipped: 0, Time elapsed: 0.19 s <<< FAILURE! - in 
org.apache.dubbo.rpc.cluster.support.ConnectivityValidationTest
   2021-11-07T11:46:56.1818867Z [ERROR] 
org.apache.dubbo.rpc.cluster.support.ConnectivityValidationTest.testRetry  Time 
elapsed: 0.007 s  <<< FAILURE!
   2021-11-07T11:46:56.1820680Z org.opentest4j.AssertionFailedError: expected: 
<2> but was: <1>
   2021-11-07T11:46:56.1822662Z         at 
org.apache.dubbo.rpc.cluster.support.ConnectivityValidationTest.testRetry(ConnectivityValidationTest.java:190)
   ```


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