carp84 commented on a change in pull request #9501: [FLINK-12697] [State Backends] Support on-disk state storage for spill-able heap backend URL: https://github.com/apache/flink/pull/9501#discussion_r334193401
########## File path: flink-state-backends/flink-statebackend-heap-spillable/src/main/java/org/apache/flink/runtime/state/heap/CopyOnWriteSkipListStateMap.java ########## @@ -1136,10 +1088,9 @@ S helpGetState(long valuePointer, SkipListValueSerializer<S> serializer) { return null; } - Chunk chunk = spaceAllocator.getChunkById(SpaceUtils.getChunkIdByAddress(valuePointer)); - int offsetInChunk = SpaceUtils.getChunkOffsetByAddress(valuePointer); - ByteBuffer bb = chunk.getByteBuffer(offsetInChunk); - int offsetInByteBuffer = chunk.getOffsetInByteBuffer(offsetInChunk); + Tuple2<ByteBuffer, Integer> tuple2 = getNodeByteBufferAndOffset(valuePointer); + ByteBuffer bb = tuple2.f0; + int offsetInByteBuffer = tuple2.f1; Review comment: I think the class is just for improving the readability and I really don't want to pass the object everywhere and keep it alive for so long. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services