Enforce Cluster Announce Parameters on Recovery#1151
Merged
Conversation
Contributor
There was a problem hiding this comment.
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,
badrishc
previously approved these changes
Apr 1, 2025
f2a3dfd to
261e455
Compare
badrishc
reviewed
Apr 2, 2025
badrishc
reviewed
Apr 2, 2025
badrishc
previously approved these changes
Apr 2, 2025
Contributor
There was a problem hiding this comment.
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. |
e9d2b79 to
e1b0ed5
Compare
badrishc
previously approved these changes
Apr 2, 2025
3aa916f to
0dcb82f
Compare
badrishc
approved these changes
Apr 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes issue #640 because now we support cluster-announce-ip and cluster-announce-port options