1kasa commented on PR #1314:
URL: https://github.com/apache/dubbo-admin/pull/1314#issuecomment-3240086106

   > > LGTM,The entire PR has an elegant code style, but I have a question: Why 
are the load order of the discovery/Component, engine/Component, and 
EventBus/Component components all set to math.MaxInt? Doesn't this make their 
startup order uncertain? Is there another way to ensure ordering? Or is 
ordering not really that important? I'm very curious about this and would like 
to hear your thoughts.LGTM,整个 PR 的代码风格都很优雅,但我有个疑问:为什么发现/Component、引擎/Component 
和 EventBus/Component 组件的加载顺序都被设置为 
math.MaxInt?这样难道不会让它们的启动顺序变得不确定吗?有没有其他方法来确保顺序?或者顺序真的没那么重要?我对此非常好奇,想听听你的想法。
   > 
   > At first, the start order of each component is hardcoded in 
[bootstrap](https://github.com/apache/dubbo-admin/blob/develop/pkg/core/bootstrap/bootstrap.go),
 so the start order is certain and ordered. The originial purpose of `Order()` 
defined in `Component` is to provide the start order: the larger the number, 
the earlier it starts. But if we defined a new component called `A` 
and最初,每个组件的启动顺序在 bootstrap 中是硬编码的,所以启动顺序是确定的且有序的。 `Order()` 在 `Component` 
中定义的初衷是为了提供启动顺序:数字越大,启动越早。但如果我们定义了一个新的组件叫 `A` ,并且 `A` is depend on `Store`, we 
need to look up the order of `Store`. if `A` is depend on many other 
components, we need to look up to the order of every components. So the design 
of `OOrder()` is not convenient enough. I have been looking for another way to 
resolve this issue. `A` 依赖于 `Store` ,我们需要查找 `Store` �
 ��序。如果 `A` 依赖于许多其他组件,我们需要查找每个组件的顺序。所以 `OOrder()` 的设计不够方便。我一直在寻找另一种解决这个问题的方法。
   
   Understood, thank you for your answer


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