Skip to content

Gatewayservice 1#64

Open
xyuanlu wants to merge 47 commits into
gateway_servicefrom
gatewayservice-1
Open

Gatewayservice 1#64
xyuanlu wants to merge 47 commits into
gateway_servicefrom
gatewayservice-1

Conversation

@xyuanlu

@xyuanlu xyuanlu commented Sep 10, 2024

Copy link
Copy Markdown
Owner

Issues

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

(No specific issue number mentioned in the description)

Description

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

This pull request introduces significant enhancements to the Helix Gateway Service, particularly focusing on implementing a poll-mode channel for the gateway service. The main changes include:

  1. Implementation of HelixGatewayServicePollModeChannel class, which periodically polls for updates on participant states and liveness.
  2. Addition of new configuration options in GatewayServiceChannelConfig to support poll mode operations.
  3. Updates to GatewayServiceManager to handle poll mode operations and manage target state caches.
  4. Introduction of utility classes like PollChannelUtil for file-based operations and health checks.
  5. Modifications to existing classes to support the new poll mode functionality.

These changes aim to provide an alternative method for managing participant states and liveness in the Helix Gateway Service, allowing for file-based and polling approaches alongside the existing gRPC-based methods.

Tests

  • The following tests are written for this issue:
  1. TestHelixGatewayServicePollModeChannel: Tests the new poll mode channel implementation, including connection events, state updates, and disconnection scenarios.
  2. TestGatewayServiceChannelConfig: Updated to include tests for invalid configurations in both gRPC and file-based modes.

Existing tests in TestHelixGatewayParticipant and TestGatewayCurrentStateCache have been modified to accommodate the new method signatures and functionality.

  • 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

  • My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:
  1. The method signatures in HelixGatewayServiceChannel interface have been updated to include clusterName parameter:

    • closeConnectionWithError(String clusterName, String instanceName, String reason)
    • completeConnection(String clusterName, String instanceName)
  2. The serializeTargetAssignmentsToJSON() method in GatewayCurrentStateCache has been renamed to serializeTargetAssignmentsToJSONNode().

Documentation

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

(No documentation changes mentioned in the description)

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)

Created with Palmier

@xyuanlu

xyuanlu commented Sep 10, 2024

Copy link
Copy Markdown
Owner Author

@palmier-bot describe

GrantPSpencer and others added 28 commits September 12, 2024 14:13
…red (apache#2914)

*  Fix new resource causing pipeline NPE when rebalance overwrites required
)

Pin netty-codec to higher version to address security vulnerability.
* Set up helix-gateway folder structure and add PoC code

* Add basic proto for gRPC calls
Add protobuff definition and an empty grpc service
This test base contains all the setups including:
1. Mock participants which hybrid with gateway services.
2. Controller with start/stop.
3. Resource creation.
4. Only Online/Offline state model.
5. Gateway services with start/stop (now leave empty until gateway service is implemented).

Also start a dummy test to extend test base to make sure all set ups are ready except gateway services.
Refactor and remove mock classes
Gateway service - service structure dummy class
…che#2847)

Gateway util for per key lock and per key blocking queue executor
Implement GatewayServiceManager
Add license to gateway service
…#2845)

- Add ST handling logic to support multi top state state model definitions without intermediary states
- Encapsulate the participant manager create, connect, disconnect logic in HelixGatewayParticipant
- Add replica state tracking in HelixGatewayParticipant
)

API to close grpc client stream connection from server side
… HelixGatewayParticipant.(apache#2868)

* Implement helix manager disconnect and client disconnect handling for HelixGatewayParticipant.
Interfaces of gateway service
Refine gateway service interface
This PR introduces a new configuration system for the Helix Gateway service, allowing for more flexible and customizable channel configurations. The main changes include:

-Introduction of GatewayServiceChannelConfig class to manage various channel configurations.
-Implementation of a factory pattern (HelixGatewayServiceChannelFactory) for creating appropriate service channels based on the configuration.
-The PR also includes various improvements in error handling, logging, and code organization.
…ansition message (apache#2892)

Gateway - User report their shards' current state instead of state transition message
Add helix-gateway to bump-up.sh and bump-snapshot.sh
This pull request introduces a caching mechanism for the Helix Gateway service. The main changes include:

Addition of a new GatewayCurrentStateCache class in GatewayCurrentStateCache.java, which manages caching of current and target states for instances in a cluster.
This pull request introduces significant enhancements to the Helix Gateway service, primarily focusing on implementing a poll-mode channel for communication. The main changes include:

Addition of a new HelixGatewayServicePollModeChannel class that implements the poll-mode communication channel.
Updates to GatewayServiceChannelConfig to support new configuration options for poll-mode.
Create condition based rebalancer
Add missing license for rebalance condition files
Co-authored-by: Tengfei Mu <tmu@linkedin.com>
Create sticky assignment rebalance strategy
…che#2888)

Move existing assignments usage calculation to pre-process stage
)

Add test to ensure no partition movement when nodes restart
* Switch to compatible grpc version.

* Bump snapshot

* Add helix-gateway-service branch to PR CI.
zpinto and others added 7 commits September 18, 2024 13:42
… the lifecycle of the channel. (apache#2913)

Expose setting gateway service channel to allow external managment of the lifecycle of the channel.
Gateway - gateway participant update target state in cache
Add helix-gateway java stubs to for jdk11 jar
Add an end to end test for helix gateway
- Synchronized calls to onNext, onError, and onComplete to prevent grpc failures
- Ensured thread safety for StreamObserver method invocations
xyuanlu and others added 11 commits October 9, 2024 17:26
Add getter for all target state - gateway service
Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.20.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](expressjs/express@4.19.2...4.20.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Support aggregated endpoint for customized stoppable check
Fix flaky test - testMultipleWrites
Fix flaky test - testExists in TestZookeeperAccessor
…he#2935)

Bumps commons-io:commons-io from 2.11.0 to 2.14.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…che#2936)

Bumps commons-io:commons-io from 2.11.0 to 2.14.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add test to prove and preserve the behavior of allowing a topology migration which can isolate shuffling to a single resource group.
Fix the bug where BestPossibleExternalViewVerifier fails to accurately verify WAGED resources. If the user has requested the WAGED resources, the verifier should run against the resources of whole cluster.
Bumps org.eclipse.jetty:jetty-server from 9.4.51.v20230217 to 9.4.55.v20240627.

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-server
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

7 participants