sashapolo commented on code in PR #2295: URL: https://github.com/apache/ignite-3/pull/2295#discussion_r1255920352
########## modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbMvPartitionStorage.java: ########## @@ -114,20 +105,22 @@ * <p>BE means Big Endian, meaning that lexicographical bytes order matches a natural order of partitions. * * <p>DESC means that timestamps are sorted from newest to oldest (N2O). - * Please refer to {@link PartitionDataHelper#putTimestampDesc(ByteBuffer, HybridTimestamp)} - * to see how it's achieved. Missing timestamp could be interpreted as a moment infinitely far away in the future. + * Please refer to {@link PartitionDataHelper#putTimestampDesc(ByteBuffer, HybridTimestamp)} to see how it's achieved. Missing timestamp + * could be interpreted as a moment infinitely far away in the future. */ public class RocksDbMvPartitionStorage implements MvPartitionStorage { /** Thread-local on-heap byte buffer instance to use for key manipulations. */ private static final ThreadLocal<ByteBuffer> HEAP_KEY_BUFFER = withInitial(() -> allocate(MAX_KEY_SIZE).order(KEY_BYTE_ORDER)); + private static final ThreadLocal<ByteBuffer> DIRECT_KEY_BUFFER = withInitial(() -> allocateDirect(MAX_KEY_SIZE).order(KEY_BYTE_ORDER)); Review Comment: Unfortunately, no, for two reasons: `MV_KEY_BUFFER` is used by the Garbage Collector, which can mess up our keys. There's also a situation, when we need *two* buffers at once, so we use both this one and `MV_KEY_BUFFER` (it's confusing I know, but I don't know how to simplify that) -- 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