Phillippko commented on code in PR #4200:
URL: https://github.com/apache/ignite-3/pull/4200#discussion_r1721248038


##########
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/PartitionDataHelper.java:
##########
@@ -263,6 +294,55 @@ static BinaryRow deserializeRow(ByteBuffer buffer) {
         return new BinaryRowImpl(schemaVersion, binaryTupleSlice);
     }
 
+    byte[] createPayloadKey(ByteBuffer dataId) {
+        byte[] result = PAYLOAD_KEY_BUFFER.get()
+                .clear()
+                .putInt(tableId)
+                .putShort((short) partitionId)
+                .put(dataId)
+                .array();
+
+        dataId.rewind();
+
+        // Always use 0 for the last bit (tombstone flag), because it only 
makes sense when data ID is stored as a value.
+        setLastBit(result, result.length - 1, false);
+
+        return result;
+    }
+
+    /**
+     * Changes the last bit of the byte identified by an index in an array.

Review Comment:
   We could use setRightMostBit, or setLsb / setLeastSignificantBit to avoid 
confusion
   
   Maybe even "setTombstoneBit"



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