-
Notifications
You must be signed in to change notification settings - Fork 8
Move SETINFO calls to ChannelHandler so they can be written along with HELLO #172
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
This reverts commit 5106ebf. Signed-off-by: Adam Fowler <[email protected]>
- Add ignore case to ValkeyPromise for commands whose results we don't care about - Add deque of pending commands to ConnectedState - Push remaining pending commands to active state once we receive the hello Signed-off-by: Adam Fowler <[email protected]>
Signed-off-by: Adam Fowler <[email protected]>
Move version to Version.swift Rename ValkeyPromise.ignore to forget Signed-off-by: Adam Fowler <[email protected]>
864fd4a
to
bf42613
Compare
Signed-off-by: Adam Fowler <[email protected]>
✅ Pull request no significant performance differences ✅ SummaryOne or more benchmarks, including `ValkeyBenchmarks:Connection: Create and drop benchmark` was not found in one of the baselines.New baseline 'pull_request' is WITHIN the 'main' baseline thresholds. Full Benchmark ComparisonComparing results between 'main' and 'pull_request'
ValkeyBenchmarksClient: GET benchmark metricsMalloc (total): results within specified thresholds, fold down for details.
Client: GET benchmark | parallel 20 | 20 concurrent connections metricsMalloc (total): results within specified thresholds, fold down for details.
Connection: GET benchmark metricsMalloc (total): results within specified thresholds, fold down for details.
Connection: Pipeline 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.
|
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.
I'm afraid this pr shows, that special casing the HELLO command in the state machine, is not the absolute worst idea, even if it initially adds a bit of code.
Focusing on this approach, I would love to see a "ValkeyConnection create and drop" benchmark for it.
Generally looks okay, though.
if pendingHelloCommand.requestID == requestID { | ||
return pendingHelloCommand | ||
return [pendingHelloCommand] + pendingCommands | ||
} |
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.
I think the cancel code here should be unreachable. HELLO and SETINFO are triggered from within the channel handler.
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.
Yeah it's unreachable, I can add a precondition instead.
Co-authored-by: Fabian Fett <[email protected]> Signed-off-by: Adam Fowler <[email protected]>
This PR shows that having all the commands from the initial handshake in one place is the best thing. I could have pipelined the hello, client setinfo inside the connection as well. |
Signed-off-by: Adam Fowler <[email protected]>
Signed-off-by: Adam Fowler <[email protected]>
No description provided.