Closed wangchengming666 closed 4 months ago
Attention: Patch coverage is 92.00000%
with 4 lines
in your changes are missing coverage. Please review.
Project coverage is 83.13%. Comparing base (
3502092
) to head (88b06f7
).
Files | Patch % | Lines |
---|---|---|
...fa/rpc/boot/container/ProviderConfigContainer.java | 89.47% | 0 Missing and 4 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
方案
在
rpc-sofa-boot
里定义一个否允许延迟服务发布至注册中心的扩展点,然后在sofa-boot-actuator
里判断应用的健康状态,通过后再继续注册到注册中心。修复后验证
demo地址:https://github.com/wangchengming666/sofa-boot-delay-demo 需要在配置里加上这两行
我的demo验证情况如下,我有一个接口配置了延时10s发布、然后应用启动后会2s循环调用一下,理论上前4~5次都会出现
Cannot get the service address of service
的异常,之后会正常调用,控制台日志打印如下