Skip to content

Conversation

@xyuanlu
Copy link
Contributor

@xyuanlu xyuanlu commented Aug 27, 2024

Issues

  • My PR addresses the following Helix issues and references them in the PR description:

#2821

Description

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

This pull request (PR) implements changes to the Helix Gateway service, focusing on improving the state transition handling and event processing that aligns to Helix long term goal - retire the concept of message and communicate only target state with helix participant.

The main modifications include:
Updating the protobuf definitions in HelixGatewayService.proto. Removing transition ID for both inbound and outbound message.

Modifying the HelixGatewayServiceChannel interface and its implementations to remove the currentState parameter from the sendStateTransitionMessage method.

Tests

  • The following tests are written for this issue:

The TestHelixGatewayParticipant class has been updated to reflect the changes in the HelixGatewayParticipant class. Specifically:

The processPendingMessage method now includes a toState parameter and updates the state transition completion logic.
The mock HelixGatewayServiceChannel implementation has been updated to match the new interface.

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

(If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)

Changes that Break Backward Compatibility (Optional)

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

(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)

Documentation (Optional)

  • In case of new functionality, my PR adds documentation in the following wiki page:

(Link the GitHub wiki you added)

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)

@xyuanlu xyuanlu changed the title Gateway - User should report their shards' current state instead of state transition message Gateway - User report their shards' current state instead of state transition message Aug 27, 2024
@xyuanlu xyuanlu marked this pull request as ready for review August 27, 2024 18:50
* @param message the message to send
*/
void sendStateTransitionMessage(String instanceName, String currentState, Message message);
void sendStateTransitionMessage(String instanceName,Message message);
Copy link
Contributor

Choose a reason for hiding this comment

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

Here's the confusing part:

  1. If you are talking about Helix state transition, why not still have state transition message? We will have target state, right?
  2. If it is the message from Gateway manager to channel, then let's not call it message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@xyuanlu
Copy link
Contributor Author

xyuanlu commented Aug 28, 2024

This PR is approved by @junkaixue
Commit message
Gateway - User report their shards' current state instead of state transition message

@xyuanlu xyuanlu merged commit 69e69ec into apache:helix-gateway-service Aug 28, 2024
asfgit pushed a commit that referenced this pull request Sep 6, 2024
…ansition message (#2892)

Gateway - User report their shards' current state instead of state transition message
asfgit pushed a commit that referenced this pull request Sep 8, 2024
…ansition message (#2892)

Gateway - User report their shards' current state instead of state transition message
asfgit pushed a commit that referenced this pull request Sep 18, 2024
…ansition message (#2892)

Gateway - User report their shards' current state instead of state transition message
asf-gitbox-commits pushed a commit that referenced this pull request Dec 9, 2025
…ansition message (#2892)

Gateway - User report their shards' current state instead of state transition message
junkaixue pushed a commit that referenced this pull request Dec 9, 2025
…ansition message (#2892)

Gateway - User report their shards' current state instead of state transition message
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