-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Multiple Endpoints #1083
base: main
Are you sure you want to change the base?
Conversation
You can use several different loopback addresses together for the test and skip dealing with Dns/network interfaces. IPv4 has the entire 127.x.x.x range for this. |
208bb46
to
a5f6025
Compare
Thanks for the suggestion. I want to test also the non-loopback addresses. So, added test for loopback ipv4 and ipv6 |
3713e9e
to
8126dd1
Compare
There was a problem hiding this comment.
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 adds support for multiple endpoints through the --bind option by refactoring various modules to work with endpoint arrays instead of a single endpoint. Key changes include updating the configuration and validation functions (e.g. in Format.cs and Options.cs), adapting server initializations (e.g. in GarnetServer and StoreWrapper), and modifying test cases to use endpoint arrays.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
test/Garnet.test/GarnetServerConfigTests.cs | Adds a new test to validate multi-endpoint support. |
libs/common/Format.cs | Refactors endpoint parsing functions to return arrays and updates error messaging. |
libs/server/Metrics/Info/GarnetInfoMetrics.cs | Adjusts metrics retrieval to support multiple endpoints. |
libs/host/Configuration/OptionsValidators.cs, Options.cs | Updates configuration options for multiple endpoints. |
test/Garnet.test/TestUtils.cs | Updates test utilities to work with endpoint arrays. |
libs/server/Resp/PurgeBPCommand.cs, libs/server/Servers/ServerOptions.cs, libs/cluster/Server/... | Various updates to replace single endpoint properties with endpoint arrays. |
test/Garnet.test/UnixSocketTests.cs, GarnetClientTests.cs, benchmark/... | Adjusts tests and benchmarks to align with multi-endpoint changes. |
This all works, just a few notes (IMHO it would be reasonable to save them for a future PR):
|
05ca313
to
cef3bdc
Compare
I made a change to log the message instead of the stack trace for the first one. |
This PR adds support for multiple endpoints through --bind option.