Skip to content

HelixGatewayParticipant only send target state implementation#2890

Closed
zpinto wants to merge 1 commit intoapache:helix-gateway-servicefrom
zpinto:zapinto/gateway_only_sends_target_state
Closed

HelixGatewayParticipant only send target state implementation#2890
zpinto wants to merge 1 commit intoapache:helix-gateway-servicefrom
zpinto:zapinto/gateway_only_sends_target_state

Conversation

@zpinto
Copy link
Contributor

@zpinto zpinto commented Aug 23, 2024

Issues

  • Implementation to allow gateway participant to only send transitions to the targetState to the client application.

Description

The intended behavior for HelixGateway is to only send the targetState to the client application. A major refactor of Helix internals will be required to achieve this, as the controller will send a state transition message for each state in the state machine instead of just the final target state.

Until that refactor, the gateway participant will consult the IdealState of the resource for the pending state transition and forward a shard assignment message that has a the to state from the IdealState instead. All following ST messages from the controller will be auto-completed and NOT forwarded to the participant, as the client is already in the target state.

Tests

  • TestHelixGatewayParticipant.testOnlySendTargetState

Changes that Break Backward Compatibility (Optional)

NA

Documentation (Optional)

NA

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)

…sitions to the targetState to the client application.
@zpinto zpinto changed the base branch from master to helix-gateway-service August 23, 2024 20:49
@junkaixue junkaixue closed this Aug 30, 2024
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