-
Notifications
You must be signed in to change notification settings - Fork 48
Cluster Map Implementation #435
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
base: main
Are you sure you want to change the base?
Conversation
boda26
commented
Oct 27, 2025
- Cluster Map Object Implementation
- Refresh ClusterMap at the start of each fanout operation; fanout operations use targets from ClusterMap object
…nout and use targets from cluster map object Signed-off-by: Miles Song <[email protected]>
|
I think that it would be much more efficient if the engine allow subscription to a notification mechanism which is triggered once the slot assignment is changed. @murphyjacob4 , wdyt? |
Signed-off-by: Miles Song <[email protected]>
|
Updated ClusterMap Implementation (significant change)
|
|
Todo: create a SocketAddress struct for ip and port |
Signed-off-by: Miles Song <[email protected]>
|
Separately stored ip and port in ClusterMap |
Signed-off-by: Miles Song <[email protected]>
Signed-off-by: Miles Song <[email protected]>
|
Added unit tests for ClusterMap |
|
|
||
| auto operator<=>(const NodeInfo&) const = default; | ||
|
|
||
| friend std::ostream& operator<<(std::ostream& os, const NodeInfo& target) { |
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.
If it's freestanding, you need to add inline. If you make it a member function then you don't need that.
vmsdk/src/cluster_map.cc
Outdated
| // Coordinator port offset - same as in src/coordinator/util.h | ||
| // This offset results in 26673 for Valkey default port 6379 - which is COORD | ||
| // on a telephone keypad. | ||
| static constexpr int kCoordinatorPortOffset = 20294; |
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.
This doesn't belong in the coordinator namespace. That's an application thing, for vmsdk, I'd just put this into it's own namespace: clustermap remove the nested namespace, i.e., just put it into vmsdk.
vmsdk/src/cluster_map.cc
Outdated
| inline int GetCoordinatorPort(int valkey_port) { | ||
| // TODO Make handling of TLS more robust | ||
| if (valkey_port == 6378) { | ||
| return valkey_port + kCoordinatorPortOffset + 1; | ||
| } |
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.
As we discussed before, the coordinator port number stuff belongs elsewhere.
Signed-off-by: Miles Song <[email protected]>
|
Update 10.30
TODO:
|
Signed-off-by: Miles Song <[email protected]>