Skip to content

[Message Prioritization] - Add currentReplicaNumber metadata for message prioritization - #3043

Merged
xyuanlu merged 11 commits into
apache:masterfrom
csudharsanan:csudhars/message-prioritization
Jul 14, 2025
Merged

[Message Prioritization] - Add currentReplicaNumber metadata for message prioritization#3043
xyuanlu merged 11 commits into
apache:masterfrom
csudharsanan:csudhars/message-prioritization

Conversation

@csudharsanan

Copy link
Copy Markdown
Contributor

Issues

Description

  • Here are some details about my PR, including screenshots of any UI changes:

    Enhances Helix's message generation phase to prioritize upward state transitions from non-second top states to second top or top states.

Tests

  • The following tests are written for this issue:

    TestPrioritizationMessageGeneration

  • The following is the result of the "mvn test" command on the appropriate module:

Screenshot 2025-05-15 at 11 24 29 AM

Changes that Break Backward Compatibility (Optional)

  • My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:

N/A

Documentation (Optional)

N/A

Commits

  • My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Code Quality

  • My diff has been formatted using helix-style.xml
    (helix-style-intellij.xml if IntelliJ IDE is used)

Comment thread helix-core/src/main/java/org/apache/helix/util/MessageUtil.java Outdated
Comment thread helix-core/src/main/java/org/apache/helix/model/Message.java Outdated
@csudharsanan
csudharsanan force-pushed the csudhars/message-prioritization branch from 95fc654 to 9b80190 Compare May 27, 2025 23:46
@csudharsanan

Copy link
Copy Markdown
Contributor Author

New test results.

[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.801 s - in org.apache.helix.controller.stages.TestPrioritizationMessageGeneration
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- jacoco:0.8.6:report (generate-code-coverage-report) @ helix-core ---
[INFO] Loading execution data file /Users/csudhars/helix/helix-core/target/jacoco.exec
[INFO] Analyzed bundle 'Apache Helix :: Core' with 960 classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  11.204 s
[INFO] Finished at: 2025-06-05T18:54:24-07:00
[INFO] ------------------------------------------------------------------------

Comment thread helix-core/src/main/java/org/apache/helix/util/MessageUtil.java
@csudharsanan
csudharsanan requested a review from xyuanlu June 23, 2025 20:55
Comment thread helix-core/src/main/java/org/apache/helix/model/OnlineOfflineSMD.java Outdated
…move filtering out second top state to top state
@csudharsanan
csudharsanan requested a review from xyuanlu June 25, 2025 21:30
Comment thread helix-core/src/main/java/org/apache/helix/util/MessageUtil.java
@xyuanlu

xyuanlu commented Jun 26, 2025

Copy link
Copy Markdown
Contributor

Generally LGTM, please address format issue and some code clean

@csudharsanan
csudharsanan requested a review from xyuanlu June 26, 2025 19:00
@csudharsanan

Copy link
Copy Markdown
Contributor Author

Generally LGTM, please address format issue and some code clean

Hey @xyuanlu updated the PR after the last comment. could you please approve this when you get a chance. thanks

@xyuanlu

xyuanlu commented Jul 8, 2025

Copy link
Copy Markdown
Contributor

LGTM. Thanks for addressing all comments :D

@csudharsanan

Copy link
Copy Markdown
Contributor Author

Thanks for the review. The PR is approved by @xyuanlu . Final commit message: "Add currentReplicaNumber metadata for message prioritization by client".

@xyuanlu
xyuanlu merged commit b02291e into apache:master Jul 14, 2025
2 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.

Prioritize upward state transitions to improve recovery time

3 participants