Add fastReplaceValuesAsync and fastReplaceValues to RMultimap and its implementations.#6300
Merged
mrniko merged 1 commit intoredisson:masterfrom Nov 28, 2024
Merged
Conversation
9c0e13b to
7cb20a6
Compare
mrniko
requested changes
Nov 26, 2024
| * @param key - map key | ||
| * @param values - map values | ||
| */ | ||
| void fastReplaceValues(K key, Iterable<? extends V> values); |
Member
There was a problem hiding this comment.
Add these methods to RMultimapRx and RMultimapReactive interfaces as well
mrniko
requested changes
Nov 26, 2024
| return replaceValuesInternal(key, values, false); | ||
| } | ||
|
|
||
| private <T> RFuture<T> replaceValuesInternal(K key, Iterable<? extends V> values, boolean returnValues) { |
Member
There was a problem hiding this comment.
A separate method is needed without returnValues parameter and "local members = redis.call('lrange', KEYS[2], 0, -1);" usage
Contributor
Author
There was a problem hiding this comment.
No longer doing SMEMBERS or LRANGE when returnValues == false. Kept the single method approach to try to avoid duplication, but let me know if you still prefer the two separate methods!
Member
There was a problem hiding this comment.
Yes, please make a separate method.
7cb20a6 to
d699576
Compare
mrniko
requested changes
Nov 27, 2024
| return replaceValuesInternal(key, values, false); | ||
| } | ||
|
|
||
| private <T> RFuture<T> replaceValuesInternal(K key, Iterable<? extends V> values, boolean returnValues) { |
Member
There was a problem hiding this comment.
Yes, please make a separate method.
2ce062f to
dfba402
Compare
… implementations. Is faster than replaceValues and replaceValuesAsync by not returning the new values. Signed-off-by: David Reis <david.alex.reis.97@gmail.com>
dfba402 to
9a10011
Compare
Member
|
Thanks for contribution! |
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.
Is faster than replaceValues and replaceValuesAsync by not returning the new values.
Closes #6294.