-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[COST] Fix NetworkCost
raises an exception when some brokers have no replica
#1499
[COST] Fix NetworkCost
raises an exception when some brokers have no replica
#1499
Conversation
NetworkCost
NetworkCost
raise exception when some broker has no replica
這邊有辦法區別是否為正在下線的節點嗎 |
目前 Balancer 沒有下線節點的機制,你要做到區別的效果是因為後面會添加這個功能嗎。 如果要做到下線節點和區別的功能的話,我能想到的做法是
上面這個做法應該不需要 Cost 想辦法區別下線節點就能做到優化,我覺得對 Cost 實作的影響應該比較低。 |
NetworkCost
raise exception when some broker has no replicaNetworkCost
raises an exception when some brokers have no replica
這個討論跟這個PR無關,不過看到順便聊一下:如果現行的balancer要加入一個功能,叫做排除某些特定節點,你覺得有機會嗎?這個功能可以用來當有節點要下線(歲修 or update),但我們要避免影響上下游應用,所以要先把該節點身上的replicas都移到其他節點 |
如果要做到你說的效果,我想到的方法有
走 2 或 3 可能比較輕鬆,但走 1 的話可以順便把 constraint optimization 這一塊補起來,但 1 應該蠻複雜的。 |
這個機制應該比較好,這塊切出來後我們可以延伸許多不同的功能,例如 topics, brokers, partitions 等等可能都可以透過這個手法做上去。能麻煩你用你的描述開一個議題出來嗎? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 做得很棒
修正兩個
NetworkCost
的 bugNetworkCost
的統計結果中沒有考慮到沒有 replica 的 broker,導致後面統計時會忽略完全空負載的節點。NetworkCost
的 MetricSensor,針對沒有 replica 的 broker 不會撈回任何 metrics,導致NetworkCost#noMetricCheck
認為還沒有至少一個階段的 metrics 被完全索取而拒絕計算。修正方法為現在刻意撈取JmxMemory
,這個 metric 在沒有 replica 的 broker 上也能撈得到。