dschneider-pivotal commented on a change in pull request #6768:
URL: https://github.com/apache/geode/pull/6768#discussion_r697741001



##########
File path: 
geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/RedisSortedSet.java
##########
@@ -106,11 +106,19 @@ protected void applyDelta(DeltaInfo deltaInfo) {
   public synchronized void toData(DataOutput out, SerializationContext 
context) throws IOException {
     super.toData(out, context);
     InternalDataSerializer.writePrimitiveInt(members.size(), out);
-    for (Map.Entry<byte[], OrderedSetEntry> entry : members.entrySet()) {
-      byte[] member = entry.getKey();
-      byte[] score = entry.getValue().getScoreBytes();
-      InternalDataSerializer.writeByteArray(member, out);
-      InternalDataSerializer.writeByteArray(score, out);
+    try {
+      members.fastForEach(entry -> {
+        byte[] member = entry.getKey();
+        byte[] score = entry.getValue().getScoreBytes();
+        try {
+          InternalDataSerializer.writeByteArray(member, out);
+          InternalDataSerializer.writeByteArray(score, out);
+        } catch (IOException e) {
+          throw new GemFireIOException("", e);
+        }
+      });
+    } catch (GemFireIOException ex) {
+      throw (IOException) ex.getCause();

Review comment:
       I addressed this by adding a toData impl to MemberMap




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


Reply via email to