SammyVimes commented on code in PR #1102:
URL: https://github.com/apache/ignite-3/pull/1102#discussion_r975202619


##########
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbMvPartitionStorage.java:
##########
@@ -335,17 +373,21 @@ public RowId insert(BinaryRow row, UUID txId) throws 
StorageException {
      * @param txId Transaction id.
      * @throws RocksDBException If write failed.
      */
-    private void writeUnversioned(byte[] keyArray, BinaryRow row, UUID txId) 
throws RocksDBException {
+    private void writeUnversioned(byte[] keyArray, BinaryRow row, UUID txId, 
UUID commitTableId, int commitPartitionId)
+            throws RocksDBException {
         WriteBatchWithIndex writeBatch = requireWriteBatch();
 
         //TODO IGNITE-16913 Add proper way to write row bytes into array 
without allocations.
         byte[] rowBytes = row.bytes();
 
-        ByteBuffer value = ByteBuffer.allocate(rowBytes.length + 
TX_ID_SIZE).order(LITTLE_ENDIAN);
+        ByteBuffer value = ByteBuffer.allocate(rowBytes.length + 
VALUE_HEADER_SIZE);
+        byte[] array = value.array();
 
-        putTransactionId(value.array(), 0, txId);
+        putUuid(array, TX_ID_OFFSET, txId);
+        putUuid(array, TABLE_ID_OFFSET, commitTableId);
+        putShort(array, PARTITION_ID_OFFSET, (short) commitPartitionId);
 
-        value.position(TX_ID_SIZE).put(rowBytes);
+        value.position(VALUE_OFFSET).put(rowBytes);
 
         // Write binary row data as a value.
         writeBatch.put(cf, copyOf(keyArray, ROW_PREFIX_SIZE), 
copyOf(value.array(), value.capacity()));

Review Comment:
   Right



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