Skip to content

Enforce Cluster Announce Parameters on Recovery#1151

Merged
vazois merged 8 commits into
microsoft:mainfrom
vazois:vazois/cluster-recover-announce
Apr 2, 2025
Merged

Enforce Cluster Announce Parameters on Recovery#1151
vazois merged 8 commits into
microsoft:mainfrom
vazois:vazois/cluster-recover-announce

Conversation

@vazois

@vazois vazois commented Mar 31, 2025

Copy link
Copy Markdown
Contributor

This PR fixes issue #640 because now we support cluster-announce-ip and cluster-announce-port options

@vazois vazois marked this pull request as ready for review March 31, 2025 23:07
Copilot AI review requested due to automatic review settings March 31, 2025 23:07

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 PR addresses issue #640 by enforcing cluster announce parameters on recovery. It introduces a new parameter (clusterAnnounceEndpoint) across server initialization methods and tests, ensuring that the cluster recovery mechanism now respects the cluster‑announce‑ip and cluster‑announce‑port options.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/Garnet.test/TestUtils.cs Updated functions to include the clusterAnnounceEndpoint parameter.
test/Garnet.test.cluster/ClusterTestContext.cs Added clusterAnnounceEndpoint parameter in instance creation.
test/Garnet.test.cluster/ClusterConfigTests.cs Added test cases to validate recovery using cluster announce endpoint.
libs/server/StoreWrapper.cs Renamed GetIp to GetClusterEndpoint and changed its return type.
libs/cluster/Server/ClusterManager.cs Updated endpoint retrieval and logging to use the cluster parameters.
Comments suppressed due to low confidence (1)

libs/cluster/Server/ClusterManager.cs:75

  • [nitpick] Consider logging clusterEndpoint.Address.ToString() instead of the entire IPEndPoint for clearer log output.
clusterEndpoint,

@vazois vazois linked an issue Mar 31, 2025 that may be closed by this pull request
@TalZaccai TalZaccai requested a review from badrishc April 1, 2025 18:22
badrishc
badrishc previously approved these changes Apr 1, 2025
@vazois vazois force-pushed the vazois/cluster-recover-announce branch from f2a3dfd to 261e455 Compare April 2, 2025 01:31
@badrishc badrishc changed the title Enforce Cluster Announce Parameters on Recovery Enforce Cluster Announce Parameters on Recovery, update default bind loopback to include IPv6 Apr 2, 2025
Comment thread libs/common/Format.cs Outdated
@badrishc badrishc changed the title Enforce Cluster Announce Parameters on Recovery, update default bind loopback to include IPv6 Enforce Cluster Announce Parameters on Recovery Apr 2, 2025
Comment thread libs/host/GarnetServer.cs Outdated
badrishc
badrishc previously approved these changes Apr 2, 2025
@badrishc badrishc requested a review from Copilot April 2, 2025 16:41

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 adds support for the cluster announce options during recovery, addressing issue #640. Key changes include:

  • Updates to documentation in the getting-started guide to clarify default endpoint bindings.
  • Modifications to test utilities and cluster context to propagate a new clusterAnnounceEndpoint parameter.
  • Adjustments in server and cluster manager logic to utilize a new GetClusterEndpoint API for consistent network behavior.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
website/docs/getting-started/build.md Updated guidance on listening endpoints.
test/Garnet.test/TestUtils.cs Added clusterAnnounceEndpoint parameter to test utility methods.
test/Garnet.test.cluster/ClusterTestContext.cs Extended instance creation with the new parameter.
test/Garnet.test.cluster/ClusterConfigTests.cs Added a new test case to verify cluster announce recovery behavior.
libs/server/StoreWrapper.cs Replaced GetIp with GetClusterEndpoint returning an IPEndPoint.
libs/host/GarnetServer.cs Modified server initialization message for multiple endpoints.
libs/common/Format.cs Updated default bind functions to use a unified approach for array setup.
libs/cluster/Server/ClusterManager.cs Updated local initialization to use the new cluster endpoint API.

Comment thread libs/common/Format.cs
@vazois vazois force-pushed the vazois/cluster-recover-announce branch from e9d2b79 to e1b0ed5 Compare April 2, 2025 17:05
badrishc
badrishc previously approved these changes Apr 2, 2025
@vazois vazois force-pushed the vazois/cluster-recover-announce branch from 3aa916f to 0dcb82f Compare April 2, 2025 19:10
@vazois vazois merged commit 4d6866e into microsoft:main Apr 2, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 2025
@vazois vazois deleted the vazois/cluster-recover-announce branch June 26, 2025 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cluster node does not update announcing ip after move

3 participants