yurinaryshkin commented on code in PR #10798:
URL: https://github.com/apache/ignite/pull/10798#discussion_r1251733520


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordV1Serializer.java:
##########
@@ -226,8 +226,11 @@ public RecordV1Serializer(
     }
 
     /** {@inheritDoc} */
-    @Override public WALRecord readRecord(FileInput in0, WALPointer expPtr) 
throws IOException, IgniteCheckedException {
-        return readWithCrc(in0, expPtr, recordIO);
+    @Override public WALRecord readRecord(ByteBufferBackedDataInput in0, 
WALPointer expPtr) throws IOException, IgniteCheckedException {
+        if (in0 instanceof FileInput)
+            return readWithCrc((FileInput)in0, expPtr, recordIO);
+        else
+            return readWithoutCrcCheck(in0, expPtr, recordIO);

Review Comment:
   This was in assumption that CRC check logic is not required, which is 
probably not true. I moved CRC checking logic to upper level so that all 
inheritors of ByteBufferBackedDataInput can now leverage the CRC check logic.



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