Giter Site home page Giter Site logo

Comments (5)

HzjNeverStop avatar HzjNeverStop commented on August 15, 2024

@EvenLjj 请帮忙一起 check 下这个 issue

from sofa-boot.

Lo1nt avatar Lo1nt commented on August 15, 2024

在SofaBoot环境下,我们会利用SofaBoot特有的 健康检查机制 来控制rpc服务向注册中心注册的时机。因为健康检查能很好的反应应用当前的情况。上述publishAllProviderConfig就是这个机制的实现: 发布rpc服务时不通知注册中心,等待应用健康检查通过后,将所有rpc服务一并注册到注册中心。

provider.delay是SofaRpc自行设计的一个小trick, 该机制的实现逻辑就是在export时直接返回成功, 随后异步处理发布动作。看起来和上述健康检查发布逻辑存在一定的冲突。我们reivew一下这里的逻辑看看如何做一下两个功能的兼容吧。

针对你目前提出的解决方案,更改 ProviderConfigContainer#publishAllProviderConfig方法,不把节点写上写注册中心,你可能需要注意上述两个机制发生的时间差,以确保最终至少有一个机制会正常向注册中心发布服务。

from sofa-boot.

EvenLjj avatar EvenLjj commented on August 15, 2024

@EvenLjj 请帮忙一起 check 下这个 issue

确实存在这个问题,可以考虑在 ProviderConfigContainer#publishAllProviderConfig 中去识别这种延迟发布的 providerConfig,根据delay时间异步去注册中心注册服务。

from sofa-boot.

wangchengming666 avatar wangchengming666 commented on August 15, 2024

related #1290

from sofa-boot.

wangchengming666 avatar wangchengming666 commented on August 15, 2024

@shawnliang1124 我修复了一版、可以拉一下我的代码验证一下功能哈。

from sofa-boot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.