yuxian0908 commented on code in PR #8503: URL: https://github.com/apache/ozone/pull/8503#discussion_r2106466322
########## hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/SnapshotDiffJob.java: ########## @@ -316,12 +316,17 @@ public Class<SnapshotDiffJob> getTypeClass() { @Override public byte[] toPersistedFormatImpl(SnapshotDiffJob object) throws IOException { - return MAPPER.writeValueAsBytes(object); + return object.toProtoBuf().toByteArray(); Review Comment: Thanks for the suggestion! I've added a test that follows the pattern from TestPipelineIDCodec and OldPipelineIDCodecForTesting. It verifies compatibility between the old and new codec implementations by ensuring that an object serialized with the old codec can be deserialized using the new codec without data loss. -- 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: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org