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



##########
File path: 
geode-apis-compatible-with-redis/src/main/java/org/apache/geode/redis/internal/data/AbstractRedisData.java
##########
@@ -207,6 +212,22 @@ protected void clearDelta() {
     this.deltaInfo = null;
   }
 
+  @Override
+  public byte[] dump() throws IOException {
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataSerializer.writeObject(this, new DataOutputStream(baos));

Review comment:
       Unfortunately the redis dump format doesn't contain any distinguishing 
header information. Although all documentation indicates objects are dumped in 
RDB format, that format is only per object and doesn't include any envelope 
information. Basically the dump format is:
   - 1 byte for the object type
   - serialized object bytes
   - 2 bytes for RDB version
   - 8 bytes for CRC checksum
   
   We can still create a unique header just for our format though.




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