Skip to content

Conversation

@nilanshu-sharma
Copy link
Collaborator

@nilanshu-sharma nilanshu-sharma commented Oct 28, 2025

Adding Numbered Database support as requested in the issue#231

  • Adding dbNum field in ValkeyClientConfiguration
  • dbNum is then propragated to ValkeyConnectionConfiguration
  • dbNum is then used to run SELECT in ValkeyChannelHandler.setConnected()

Added Integration test to verify selecting all default available 16 databases and doing operations against them.

@nilanshu-sharma nilanshu-sharma changed the title Add Support for Numbered Databases [Work in Progress]: Add Support for Numbered Databases Oct 28, 2025
@github-actions
Copy link

github-actions bot commented Oct 28, 2025

✅ Pull request no significant performance differences ✅

Summary

New baseline 'pull_request' is WITHIN the 'main' baseline thresholds.

Full Benchmark Comparison

Comparing results between 'main' and 'pull_request'

Host '306849a54802' with 4 'x86_64' processors with 15 GB memory, running:
#18~24.04.1-Ubuntu SMP Sat Jun 28 04:46:03 UTC 2025

ValkeyBenchmarks

Client: GET benchmark metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 74 78 79 80 81 81 81 6
pull_request 75 76 80 81 83 83 83 6
Δ 1 -2 1 1 2 2 2 0
Improvement % -1 3 -1 -1 -2 -2 -2 0

Client: GET benchmark | parallel 20 | 20 concurrent connections metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 72 78 79 82 84 87 87 28
pull_request 73 77 79 82 84 85 85 28
Δ 1 -1 0 0 0 -2 -2 0
Improvement % -1 1 0 0 0 2 2 0

Connection: GET benchmark metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 4 4 4 4 4 4 4 8
pull_request 4 4 4 4 4 4 4 8
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

Connection: GET benchmark – NoOpTracer metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 7 8 8 10 11 11 11 8
pull_request 7 8 8 10 11 11 11 8
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

Connection: Pipeline array benchmark metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 33 33 34 34 34 34 34 6
pull_request 33 33 33 34 34 34 34 6
Δ 0 0 -1 0 0 0 0 0
Improvement % 0 0 3 0 0 0 0 0

Connection: Pipeline benchmark metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 33 33 33 34 34 34 34 6
pull_request 33 33 33 34 34 34 34 6
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

HashSlot – {user}.whatever metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 0 0 0 0 0 0 0 19
pull_request 0 0 0 0 0 0 0 18
Δ 0 0 0 0 0 0 0 -1
Improvement % 0 0 0 0 0 0 0 -1

ValkeyCommandEncoder – Command with 7 words metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 0 0 0 0 0 0 0 748
pull_request 0 0 0 0 0 0 0 754
Δ 0 0 0 0 0 0 0 6
Improvement % 0 0 0 0 0 0 0 6

ValkeyCommandEncoder – Simple GET metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 0 0 0 0 0 0 0 1925
pull_request 0 0 0 0 0 0 0 1923
Δ 0 0 0 0 0 0 0 -2
Improvement % 0 0 0 0 0 0 0 -2

ValkeyCommandEncoder – Simple MGET 15 keys metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 0 0 0 0 0 0 0 363
pull_request 0 0 0 0 0 0 0 363
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

@nilanshu-sharma nilanshu-sharma changed the title [Work in Progress]: Add Support for Numbered Databases Add Support for Numbered Databases Oct 29, 2025
Copy link
Collaborator

@adam-fowler adam-fowler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general looks good. Minor naming issue. I'd rather full descriptive variable names without acronyms.

@nilanshu-sharma
Copy link
Collaborator Author

nilanshu-sharma commented Oct 29, 2025

Soundness API breakage check failing because the initializer signature got modified with the introduction of new field databaseNumber but it should probably be alright as its expected to happen before releasing 1.0. Thoughts @adam-fowler ?

  💔 API breakage: constructor ValkeyConnectionConfiguration.init(authentication:commandTimeout:blockingCommandTimeout:tls:clientName:readOnly:) has been removed
  💔 API breakage: constructor ValkeyClientConfiguration.init(authentication:connectionPool:keepAliveBehavior:retryParameters:commandTimeout:blockingCommandTimeout:tls:) has been removed

@adam-fowler
Copy link
Collaborator

@nilanshu-sharma You need to sign off each of your commits. ie add Signed-off-by: Nilanshu Sharma <nilanshu_sharma@apple.com> at the bottom of each commit comment. This is a requirement of the Valkey org.

You can add this text automatically using git commit -s or if you are using VSCode their is an option to do this automatically for you Git: Always sign off.

Nilanshu Sharma added 7 commits October 30, 2025 09:31
Signed-off-by: Nilanshu Sharma <nilanshu_sharma@apple.com>
Signed-off-by: Nilanshu Sharma <nilanshu_sharma@apple.com>
Signed-off-by: Nilanshu Sharma <nilanshu_sharma@apple.com>
Signed-off-by: Nilanshu Sharma <nilanshu_sharma@apple.com>
Signed-off-by: Nilanshu Sharma <nilanshu_sharma@apple.com>
Signed-off-by: Nilanshu Sharma <nilanshu_sharma@apple.com>
Signed-off-by: Nilanshu Sharma <nilanshu_sharma@apple.com>
@nilanshu-sharma
Copy link
Collaborator Author

@nilanshu-sharma You need to sign off each of your commits. ie add Signed-off-by: Nilanshu Sharma <nilanshu_sharma@apple.com> at the bottom of each commit comment. This is a requirement of the Valkey org.

You can add this text automatically using git commit -s or if you are using VSCode their is an option to do this automatically for you Git: Always sign off.

Singed off all the commits in this PR.

@nilanshu-sharma nilanshu-sharma enabled auto-merge (squash) October 30, 2025 16:45
@nilanshu-sharma nilanshu-sharma merged commit 41e8f86 into main Oct 30, 2025
12 of 13 checks passed
@nilanshu-sharma nilanshu-sharma deleted the numbered-databases branch October 30, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants