-
Notifications
You must be signed in to change notification settings - Fork 8
Add ValkeyNodeDescription, Rename ServerAddress, and Add Connection Pool Components Summary #85
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
Conversation
✅ Pull request no significant performance differences ✅ SummaryNew baseline 'pull_request' is WITHIN the 'main' baseline thresholds. Full Benchmark ComparisonComparing results between 'main' and 'pull_request'
ValkeyBenchmarksGET benchmark metricsMalloc (total): results within specified thresholds, fold down for details.
HashSlot – {user}.whatever metricsMalloc (total): results within specified thresholds, fold down for details.
ValkeyCommandEncoder – Command with 7 words metricsMalloc (total): results within specified thresholds, fold down for details.
ValkeyCommandEncoder – Simple GET metricsMalloc (total): results within specified thresholds, fold down for details.
ValkeyCommandEncoder – Simple MGET 15 keys metricsMalloc (total): results within specified thresholds, fold down for details.
|
/// - Note: This type is primarily used internally by the Valkey client for node management | ||
/// in cluster configurations. | ||
@usableFromInline | ||
package struct ValkeyNodeDescription: Identifiable, Hashable, Sendable { |
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.
Should this conform to ValkeyNodeDescriptionProtocol
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.
It doesn't need to. ValkeyNodeDescription is our real currency type. But I don't want to force adopters to give us ValkeyNodeDescription
directly. Instead they can use ValkeyNodeDescriptionProtocol
representations.
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.
So you have two APIs? One for ValkeyNodeDescriptionProtocol
and one for ValkeyNodeDescription
? Or are you going to create a ValkeyNodeDescription
from the supplied ValkeyNodeDescriptionProtocol
.
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.
Or are you going to create a ValkeyNodeDescription from the supplied ValkeyNodeDescriptionProtocol.
Internally we only use ValkeyNodeDescription
. ValkeyNodeDescriptionProtocol
is its public equivalent.
} | ||
self.runStateMachineActions(actions) | ||
} |
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.
Have these changes been propagated back to the PostgresNIO connection pool?
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.
Not yet.
import NIOCore | ||
|
||
/// Server address to connect to | ||
public struct ValkeyServerAddress: Sendable, Equatable { |
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.
You need to fix the tests as they are still referencing ServerAddress
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.
Done.
131505c
to
cb9a43e
Compare
…ool Components Summary (#85)
…ool Components Summary (#85)
This PR introduces several improvements to the node management and connection pool functionality:
Motivation
These changes are made to allow easier testability of the cluster types that will follow in follow up PRs.
Changes
ValkeyNodeDescription
Added a new type that represents metadata about a Valkey node, containing information such as the node's address, health status, and other relevant properties.
ServerAddress Rename
Renamed ServerAddress to ValkeyServerAddress and moved it to its own file for better organization and to align with the naming convention of other components.
Connection Pool Components
Added two new protocols: