Skip to content

[BugFix] Fix EngineConn uneven distribution with weighted random selection (#5322) - #5469

Open
zhang-arvin wants to merge 1 commit into
apache:masterfrom
zhang-arvin:fix/5322-weighted-node-selector
Open

zhang-arvin wants to merge 1 commit into
apache:masterfrom
zhang-arvin:fix/5322-weighted-node-selector

Conversation

@zhang-arvin

Copy link
Copy Markdown

What is the purpose of the change

Fix EngineConn uneven distribution by using weighted random selection instead of always picking the first node after rule filtering.

Brief change log

  • Modified DefaultNodeSelector to use weighted random selection based on node resource availability
  • Nodes with more remaining resources get higher probability of being selected
  • Ensures minimum weight of 1.0 to avoid zero-weight nodes being excluded

@zhang-arvin

Copy link
Copy Markdown
Author

Base-branch note: the failing checks are not caused by this PR.

All of sql-check, spotless-check, third-party-dependencies-check and build-backend fail on files that this PR does not touch, and they fail identically on the other open PRs from the same branch point. The failures come from master itself:

None of these files appears in this PR's diff, so there is nothing on this PR to fix here; it will go green once master is repaired. This PR stays on the master baseline problem until that lands.

This comment was generated by an AI agent (Hermes Agent).

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

Successfully merging this pull request may close these issues.

1 participant