sashapolo commented on code in PR #2295: URL: https://github.com/apache/ignite-3/pull/2295#discussion_r1255923525
########## modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbMvPartitionStorage.java: ########## @@ -657,21 +684,25 @@ private ReadResult readResultFromKeyAndValue(boolean isWriteIntent, ByteBuffer k * @return Read result. */ private ReadResult readByTimestamp(RocksIterator seekIterator, RowId rowId, HybridTimestamp timestamp) { - ByteBuffer keyBuf = prepareHeapKeyBuf(rowId); + ByteBuffer keyBuf = prepareDirectKeyBuf(rowId); // Put timestamp restriction according to N2O timestamps order. putTimestampDesc(keyBuf, timestamp); + keyBuf.rewind(); + // This seek will either find a key with timestamp that's less or equal than required value, or a different key whatsoever. // It is guaranteed by descending order of timestamps. - seekIterator.seek(keyBuf.array()); + seekIterator.seek(keyBuf); + + keyBuf.rewind(); return handleReadByTimestampIterator(seekIterator, rowId, timestamp, keyBuf); } /** - * Walks "version chain" via the iterator to find a row by timestamp. - * See {@link MvPartitionStorage#read(RowId, HybridTimestamp)} for details. + * Walks "version chain" via the iterator to find a row by timestamp. See {@link MvPartitionStorage#read(RowId, HybridTimestamp)} for Review Comment: Because that's what IDEA does with its autoformatting. If you want to have two sentences on separate lines, you should use `<p>` tags -- 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