Skip to content

fix:P2C LoadBalancer responseTrigger calculates wrong - #6428

Merged
Aias00 merged 4 commits into
apache:masterfrom
hengyuss:fix/P2C_LoadBalancer_responseTrigger_calculates_wrong
Jul 23, 2026
Merged

Aias00 merged 4 commits into
apache:masterfrom
hengyuss:fix/P2C_LoadBalancer_responseTrigger_calculates_wrong

Conversation

@hengyuss

Copy link
Copy Markdown
Contributor

Fixes #6427

Make sure that:

  • You have read the contribution guidelines.
  • You submit test cases (unit or integration tests) that back your changes.
  • Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes an EWMA decay-weight calculation bug in the Divide plugin’s P2C load-balancing response tracking by ensuring the previous responseStamp is read before it is overwritten, so the time delta (td) is no longer forced to 0.

Changes:

  • Reorders getResponseStamp() / setResponseStamp(now) in DividePlugin#responseTrigger to compute td correctly for EWMA updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Aias00
Aias00 merged commit ea4f177 into apache:master Jul 23, 2026
40 checks passed
eye-gu pushed a commit to eye-gu/shenyu that referenced this pull request Sep 30, 2026
@Aias00 Aias00 added this to the 2.7.2 milestone Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: divide type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] P2C LoadBalancer responseTrigger calculates wrong EWMA decay weight due to reversed get/set order

4 participants