Valkey-8: add BY/GET support for SORT/RO in cluster mode#2252
Merged
shohamazon merged 1 commit intovalkey-io:mainfrom Sep 12, 2024
Merged
Valkey-8: add BY/GET support for SORT/RO in cluster mode#2252shohamazon merged 1 commit intovalkey-io:mainfrom
shohamazon merged 1 commit intovalkey-io:mainfrom
Conversation
8ad4757 to
8b95058
Compare
daeef61 to
c03ac99
Compare
Comment on lines
+1256
to
+1259
| * @apiNote When in cluster mode, both <code>key</code> and the patterns specified in {@link | ||
| * SortOptions#byPattern} and {@link SortOptions#getPatterns} must hash to the same slot. The | ||
| * use of {@link SortOptions#byPattern} and {@link SortOptions#getPatterns} in cluster mode is | ||
| * supported since Valkey version 8.0. |
There was a problem hiding this comment.
Please add sross slot test there
node/src/Commands.ts
Outdated
| * slot as the key, and this is supported only since Valkey version 8.0. | ||
| */ | ||
| export type SortOptions = SortBaseOptions & { | ||
| export type SortOptions = { |
There was a problem hiding this comment.
According to new starndards introduced by Avi, this should an interface
node/src/GlideClient.ts
Outdated
| GlideString, | ||
| PubSubMsg, | ||
| ReadFrom, // eslint-disable-line @typescript-eslint/no-unused-vars | ||
| PubSubMsg, // eslint-disable-line @typescript-eslint/no-unused-vars |
node/src/GlideClusterClient.ts
Outdated
| GlideString, | ||
| PubSubMsg, | ||
| ReadFrom, // eslint-disable-line @typescript-eslint/no-unused-vars | ||
| PubSubMsg, // eslint-disable-line @typescript-eslint/no-unused-vars |
node/src/Transaction.ts
Outdated
| GlideString, | ||
| HashDataType, | ||
| ReadFrom, // eslint-disable-line @typescript-eslint/no-unused-vars | ||
| HashDataType, // eslint-disable-line @typescript-eslint/no-unused-vars |
node/tests/SharedTests.ts
Outdated
| await client.sinter( | ||
| [Buffer.from(key1), Buffer.from(key2)], | ||
| { decoder: Decoder.Bytes }, | ||
| { |
c03ac99 to
9b7ba33
Compare
acarbonetto
approved these changes
Sep 11, 2024
| * This command is routed depending on the client's {@link ReadFrom} strategy. | ||
| * | ||
| * @since Valkey 7.0 and above. | ||
| * @see <a href="https://valkey.io/commands/sort_ro/">valkey.io</a> for details. |
| * This command is routed depending on the client's {@link ReadFrom} strategy. | ||
| * | ||
| * @since Valkey 7.0 and above. | ||
| * @see <a href="https://valkey.io/commands/sort_ro/">valkey.io</a> for details. |
| * use of {@link SortOptions#byPattern} and {@link SortOptions#getPatterns} in cluster mode is | ||
| * supported since Valkey version 8.0. | ||
| * @since Valkey 7.0 and above. | ||
| * @see <a href="https://valkey.io/commands/sort_ro/">valkey.io</a> for details. |
Contributor
There was a problem hiding this comment.
404 not found
I'm not sure we should be added a reference here that doesn't exist. It kind of looks bad. Maybe just add a link to sort?
Collaborator
Author
There was a problem hiding this comment.
I dont know why this page doesnt exist
| * same slot. The use of {@link SortOptionsBinary#byPattern} and {@link | ||
| * SortOptionsBinary#getPatterns} in cluster mode is supported since Valkey version 8.0. | ||
| * @since Valkey 7.0 and above. | ||
| * @see <a href="https://valkey.io/commands/sort_ro/">valkey.io</a> for details. |
yipin-chen
reviewed
Sep 11, 2024
| @MethodSource("getClients") | ||
| public void sort_with_pattern(BaseClient client) { | ||
| if (client instanceof GlideClusterClient) { | ||
| assumeTrue(SERVER_VERSION.isGreaterThanOrEqualTo("7.9.0"), "This feature added in version 8"); |
Collaborator
There was a problem hiding this comment.
I know Valkey 7.9 is 8 (while in RC). I am just wondering whether we need to update the test to use "8.0.0" or just leave "7.9.0" as is.
Collaborator
Author
There was a problem hiding this comment.
I have an issue to change that once valkey 8 is released
e75d3d0 to
e4f14f2
Compare
Signed-off-by: Shoham Elias <shohame@amazon.com>
e4f14f2 to
4569e52
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.