jdeppe-pivotal commented on a change in pull request #7319:
URL: https://github.com/apache/geode/pull/7319#discussion_r796139281



##########
File path: 
geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSet.java
##########
@@ -245,45 +244,61 @@ static int setOpStoreResult(RegionProvider 
regionProvider, RedisKey destinationK
     return scanResult;
   }
 
-  public Collection<byte[]> spop(Region<RedisKey, RedisData> region, RedisKey 
key, int popCount) {
-    int originalSize = scard();
-    if (originalSize == 0) {
-      return emptyList();
+  public List<byte[]> spop(int count, Region<RedisKey, RedisData> region, 
RedisKey key) {
+    int randMethodRatio = 3;

Review comment:
       Can this just be a static constant? Please also add some comments as to 
what the reasoning is.
   
   I'm somewhat hesitant to add optimizations like this without any quantifying 
metrics to justify; since, on the face of it, it just ends up complicating the 
code - especially for someone who may look at it in the future without any 
context. This is just a general comment and not a request to change it... :)




-- 
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: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to