DonalEvans commented on a change in pull request #7257:
URL: https://github.com/apache/geode/pull/7257#discussion_r782637671
##########
File path:
geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSet.java
##########
@@ -108,21 +104,18 @@ public static int sdiffstore(RegionProvider
regionProvider, RedisKey destination
private static MemberSet calculateDiff(RegionProvider regionProvider,
List<RedisKey> keys,
boolean updateStats) {
RedisSet firstSet = regionProvider.getTypedRedisData(REDIS_SET,
keys.get(0), updateStats);
+ MemberSet diff = new MemberSet();
if (firstSet.scard() == 0) {
Review comment:
I think that if there is no value associated with the key then we return
a `NULL_REDIS_SET` here, which returns 0 when `scard()` is called on it, so
this check is actually doing something.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]