Skip to content
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

Java: add RANDOMKEY #1576

Merged
merged 20 commits into from
Jun 19, 2024
Merged

Conversation

cyip10
Copy link
Collaborator

@cyip10 cyip10 commented Jun 15, 2024

Issue #, if available:
https://redis.io/docs/latest/commands/randomkey/
Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@cyip10 cyip10 requested a review from a team as a code owner June 15, 2024 00:13
@cyip10 cyip10 force-pushed the java/integ_cyip10_randomkey branch from bbc2581 to 8ac8b21 Compare June 17, 2024 16:52
@@ -112,4 +112,40 @@ public interface GenericClusterCommands {
* }</pre>
*/
CompletableFuture<Object[]> exec(ClusterTransaction transaction, SingleNodeRoute route);

/**
* Returns a random key. <br>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we mentioned database in cluster mode?

Suggested change
* Returns a random key. <br>
* Returns a random key from the currently selected database. <br>

Copy link
Collaborator

Choose a reason for hiding this comment

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

currently selected database is used for standalone (select command)

we can write about the routing that determents where are is the randomkey selected from

@acarbonetto acarbonetto force-pushed the java/integ_cyip10_randomkey branch from c926c2e to e2625bc Compare June 18, 2024 23:36
@acarbonetto acarbonetto force-pushed the java/integ_cyip10_randomkey branch from e2625bc to 159db27 Compare June 18, 2024 23:46
Signed-off-by: Andrew Carbonetto <[email protected]>
@acarbonetto acarbonetto merged commit a44c3c4 into valkey-io:main Jun 19, 2024
46 checks passed
@acarbonetto acarbonetto deleted the java/integ_cyip10_randomkey branch June 19, 2024 00:06
cyip10 added a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 19, 2024
* RCT test

* implement random val

* work on SCT

* implement randomkey no examples

* current progress

* implement randomKey

* ran spotlessApply

* addressed interface comment

* progress on pause

* address redis issue

* add todo for redis rs issue

* current progress address commentS

* run into cluster error

* ran into cluster error

* address comments

* address test comments

* resolve merge conflicts

* address cluster comment

* Disable failing test until redis-rs fix in

Signed-off-by: Andrew Carbonetto <[email protected]>

* SPOTLESS

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
Co-authored-by: Chloe Yip <[email protected]>
Co-authored-by: Chloe Yip <[email protected]>
Co-authored-by: Andrew Carbonetto <[email protected]>
cyip10 added a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
* RCT test

* implement random val

* work on SCT

* implement randomkey no examples

* current progress

* implement randomKey

* ran spotlessApply

* addressed interface comment

* progress on pause

* address redis issue

* add todo for redis rs issue

* current progress address commentS

* run into cluster error

* ran into cluster error

* address comments

* address test comments

* resolve merge conflicts

* address cluster comment

* Disable failing test until redis-rs fix in

Signed-off-by: Andrew Carbonetto <[email protected]>

* SPOTLESS

Signed-off-by: Andrew Carbonetto <[email protected]>

---------

Signed-off-by: Andrew Carbonetto <[email protected]>
Co-authored-by: Chloe Yip <[email protected]>
Co-authored-by: Chloe Yip <[email protected]>
Co-authored-by: Andrew Carbonetto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants