You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by "smalljunHw (via GitHub)" <gi...@apache.org> on 2023/03/22 03:56:31 UTC
[GitHub] [servicecomb-java-chassis] smalljunHw opened a new issue, #3723: 微服务实例查询更新存在并发问题,导致先查询的实例状态后更新的问题
smalljunHw opened a new issue, #3723:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3723
分析ServiceComb 的源码(1.3.8),发现实例查找存在并发问题,导致出现先查询的实例状态后更新的问题。
触发实例查找和更新主要有两个触发源
1)周期查询更新
2)watch触发
不同的来源会在Service Center Task线程池提交查询更新任务,且可能在不同线程中并发执行,主要步骤为:
```bash
触发源(周期/watch) ---> 注册中心查询实例信息 ---> 实例状态更新到本地缓存
```
从代码看,只有更新本地实例状态时才会有锁同步操作,查询实例则可能并发执行。由于线程调度切换问题,因此即使是先查询到的实例状态结果,也有可能被后更新,导致以上结果。
此问题在注册中心实例watch模式下,多个实例同时下线时可以复现,请求会发到已下线的节点而失败。
--
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: commits-unsubscribe@servicecomb.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3723: 微服务实例查询更新存在并发问题,导致先查询的实例状态后更新的问题
Posted by "liubao68 (via GitHub)" <gi...@apache.org>.
liubao68 commented on issue #3723:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3723#issuecomment-1479089170
我记得最新版本实例查询是有控制的。
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [servicecomb-java-chassis] smalljunHw commented on issue #3723: 微服务实例查询更新存在并发问题,导致先查询的实例状态后更新的问题
Posted by "smalljunHw (via GitHub)" <gi...@apache.org>.
smalljunHw commented on issue #3723:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3723#issuecomment-1489554456
2.8.x分支吗?1.3.x分支能否也修改下这个问题?
--
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: commits-unsubscribe@servicecomb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org