sashapolo commented on code in PR #2295:
URL: https://github.com/apache/ignite-3/pull/2295#discussion_r1255935892


##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/io/RowVersionDataIo.java:
##########
@@ -50,46 +52,102 @@ protected RowVersionDataIo(int ver) {
     }
 
     @Override
-    protected void writeRowData(long pageAddr, int dataOff, int payloadSize, 
RowVersion row, boolean newRow) {
+    protected void writeRowData(long pageAddr, int dataOff, int payloadSize, 
RowVersion rowVersion, boolean newRow) {
         assertPageType(pageAddr);
 
         long addr = pageAddr + dataOff;
 
         putShort(addr, 0, (short) payloadSize);
         addr += Short.BYTES;
 
-        addr += HybridTimestamps.writeTimestampToMemory(addr, 0, 
row.timestamp());
+        addr += HybridTimestamps.writeTimestampToMemory(addr, 0, 
rowVersion.timestamp());
 
-        addr += writePartitionless(addr, row.nextLink());
+        addr += writePartitionless(addr, rowVersion.nextLink());
 
-        putInt(addr, 0, row.valueSize());
+        putInt(addr, 0, rowVersion.valueSize());
         addr += Integer.BYTES;
 
-        putByteBuffer(addr, 0, row.value());
+        BinaryRow row = rowVersion.value();
+
+        if (row != null) {
+            // Write schema version in LE order.
+            putByte(addr, 0, (byte) row.schemaVersion());
+            putByte(addr, 1, (byte) (row.schemaVersion() >> Byte.SIZE));
+            putByte(addr, 2, (byte) (row.hasValue() ? 1 : 0));
+            putByteBuffer(addr, 3, row.tupleSlice());
+        }
     }
 
     @Override
-    protected void writeFragmentData(RowVersion row, ByteBuffer pageBuf, int 
rowOff, int payloadSize) {
+    protected void writeFragmentData(RowVersion rowVersion, ByteBuffer 
pageBuf, int rowOff, int payloadSize) {
         assertPageType(pageBuf);
 
         if (rowOff == 0) {
             // first fragment
-            assert row.headerSize() <= payloadSize : "Header must entirely fit 
in the first fragment, but header size is "
-                    + row.headerSize() + " and payload size is " + payloadSize;
+            assert rowVersion.headerSize() <= payloadSize : "Header must 
entirely fit in the first fragment, but header size is "
+                    + rowVersion.headerSize() + " and payload size is " + 
payloadSize;

Review Comment:
   What do you mean? I didn't change the header...



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to