Skip to content

feat(cadence-matching): simplify the load calculation for shards#7647

Merged
eleonoradgr merged 1 commit intocadence-workflow:masterfrom
eleonoradgr:simplify-load-call
Feb 11, 2026
Merged

feat(cadence-matching): simplify the load calculation for shards#7647
eleonoradgr merged 1 commit intocadence-workflow:masterfrom
eleonoradgr:simplify-load-call

Conversation

@eleonoradgr
Copy link
Contributor

What changed?
Instead of relying on LoadBalancerHints for load calculation, we rely on a new method QueriesPerSecond, which is only providing the value we are interested in

Why?
This is a more efficient way to get the load, since startWG.Wait() which is invoked in the LoadBalancerHints is stopping until the tasklist is started, but we don't really need to wait at startup, since the load will be 0.

How did you test it?
unit tests

Potential risks
no risk, we are using the same value right now

Release notes

Documentation Changes

Signed-off-by: edigregorio <edigregorio@uber.com>
@gitar-bot
Copy link

gitar-bot bot commented Jan 27, 2026

Running post-merge workflows

Code Review ✅ Approved

Clean refactoring that simplifies load calculation by adding a direct QPS accessor method, eliminating unnecessary blocking during startup. The change is well-tested and maintains functional equivalence.

Rules ❌ No requirements met

Repository Rules

PR Description Quality Standards: Improve [How did you test it?] with exact test commands (e.g., `go test -v ./service/matching -run TestQueriesPerSecond`). Enhance [Why?] to explain why QueriesPerSecond method was chosen over alternatives. Strengthen [Potential risks] with specific backward compatibility and rollback analysis.
Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@eleonoradgr eleonoradgr changed the title feat[cadence-matching]: simplify the load calculation for shards feat [cadence-matching]: simplify the load calculation for shards Jan 27, 2026
@gitar-bot gitar-bot bot changed the title feat [cadence-matching]: simplify the load calculation for shards feat(cadence-matching): simplify the load calculation for shards Jan 27, 2026
@gitar-bot
Copy link

gitar-bot bot commented Jan 27, 2026

Updated the PR title to follow conventional commit format: changed from feat [cadence-matching]: to feat(cadence-matching):. The validation check should pass on the next run.

Copy link
Contributor

@arzonus arzonus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🚀

@eleonoradgr eleonoradgr merged commit 960a77b into cadence-workflow:master Feb 11, 2026
74 of 78 checks passed
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.

2 participants