-
Notifications
You must be signed in to change notification settings - Fork 612
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
ISPN-14597 SINTER resp command #11035
Conversation
62734d7
to
fcc32c0
Compare
62c1284
to
1365923
Compare
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.
just a couple of changes for now, I will do a deeper review after
@jabolina as well
server/resp/src/main/java/org/infinispan/server/resp/commands/set/SCARD.java
Outdated
Show resolved
Hide resolved
server/resp/src/main/java/org/infinispan/server/resp/commands/set/SCARD.java
Outdated
Show resolved
Hide resolved
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.
A few things. Also, I missed some tests for the embedded set in multimap.
multimap/src/main/java/org/infinispan/multimap/impl/function/SGetFunction.java
Outdated
Show resolved
Hide resolved
server/resp/src/test/java/org/infinispan/server/resp/DistributedSetTest.java
Show resolved
Hide resolved
multimap/src/main/java/org/infinispan/multimap/impl/SetBucket.java
Outdated
Show resolved
Hide resolved
multimap/src/main/java/org/infinispan/multimap/impl/EmbeddedSetCache.java
Outdated
Show resolved
Hide resolved
server/resp/src/main/java/org/infinispan/server/resp/commands/hash/HGET.java
Show resolved
Hide resolved
server/resp/src/main/java/org/infinispan/server/resp/commands/set/SINTERCARD.java
Outdated
Show resolved
Hide resolved
server/resp/src/main/java/org/infinispan/server/resp/commands/set/SMEMBERS.java
Outdated
Show resolved
Hide resolved
server/resp/src/test/java/org/infinispan/server/resp/RespSetCommandsTest.java
Outdated
Show resolved
Hide resolved
c6e1ae8
to
bc63ca0
Compare
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.
Just some small things, and we're good. We should document the behavior of these commands with other concurrent operations over the same sets. As I guess we don't have the same guarantees as in Redis.
multimap/src/main/java/org/infinispan/multimap/impl/function/set/SSetFunction.java
Outdated
Show resolved
Hide resolved
server/resp/src/test/java/org/infinispan/server/resp/test/RespTestingUtil.java
Outdated
Show resolved
Hide resolved
I changed the implementation to use atomic getAll, this way the behaviour should be the same as Redis. Looking at the docs I can't find anything special for the intersect commands implemented here. please squash the commits if all good. getAll is a separate commit |
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.
A few comments, but we can continue.
// await(set.add(NAMES_KEY, ELAIA)); | ||
// assertValuesAndOwnership(NAMES_KEY, ELAIA); |
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.
Do we have an issue with these?
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.
oh, it's a mistake. I restored these lines in #10906. Thanks!
* @param keys, collection of keys to be get | ||
* @return {@link CompletionStage} containing a {@link } | ||
*/ | ||
public CompletableFuture<Map<K, SetBucket<V>>> getAll(Set<K> keys) { |
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.
Maybe in future changes, we update to avoid returning the bucket as it is just an abstraction.
|
||
public static Set<WrappedByteArray> checkTypesAndReturnEmpty(Collection<SetBucket<WrappedByteArray>> buckets) { | ||
var iter = buckets.iterator(); | ||
// access all items to check for error |
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.
Class cast errors?
A bunch of commands for sets.
Code was almost the same, so this PR refers to 3 jiras.
https://issues.redhat.com/browse/ISPN-14597
SINTER SINTERCARD SINTERSTORE
https://issues.redhat.com/browse/ISPN-14598
SMEMBERS
https://issues.redhat.com/browse/ISPN-14595
SCARD