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



##########
File path: 
geode-for-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSet.java
##########
@@ -415,6 +413,14 @@ public long sadd(List<byte[]> membersToAdd, 
Region<RedisKey, RedisData> region,
     return membersAdded;
   }
 
+  void addForSmove(byte[] memberToAdd, Region<RedisKey, RedisData> region, 
RedisKey key) {

Review comment:
       I think this cross-cutting concern **_can_** actually be pushed into 
`AbstractRedisData.storeChanges`. I lightly tested adding the following:
   ```
     private boolean txActive(Region<RedisKey, RedisData> region) {
       TXId txId;
       if (region instanceof LocalDataSet) {
         txId = ((LocalDataSet) region).getProxy().getTXId();
       } else {
         txId = ((PartitionedRegion) region).getTXId();
       }
       return txId != null && txId.getUniqId() != NOTX;
     }
   ```
   And then wrapping the `setDelta(deltaInfo)` call, in `storeChanges`, with 
this. @dschneider-pivotal - what do you think?




-- 
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