upthewaterspout commented on a change in pull request #6605:
URL: https://github.com/apache/geode/pull/6605#discussion_r658201369
##########
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:
I think we need some extra information for future compatibility. We
probably need to include the geode version in the dumped object, so that
restore can create a VersionedDataInputStream with that geode version.
I think we also are going to want to be able to `RESTORE` from values that
come from native redis at some point. So I think at least the header for our
dump format should match redis's - but with an incompatible version or
something. So in the future we could read a header and do a switch in the
version to restore in our format or there.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]