Skip to content
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

[METRICS] 指標收集可能造成 busy waiting #1834

Open
chinghongfang opened this issue Jul 20, 2023 · 0 comments
Open

[METRICS] 指標收集可能造成 busy waiting #1834

chinghongfang opened this issue Jul 20, 2023 · 0 comments

Comments

@chinghongfang
Copy link
Collaborator

Related to #1833

在 PR #1833 中,receiver timeout 設定為零,不再等待 metric 收集。目的是不讓 receiver 之間不要彼此等候。

但是這樣的作法,當所有 receiver 都沒有 metric 時,這隻線程會不斷嘗試執行每個 receiver,形成 busy waiting,浪費計算資源。或許應該判斷當所有 receiver 都沒有 metric 時,等待 metric 可取得 (也許下一次迴圈便會設定 timeout, block 在其中一個 receiver 上)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant