pnowojski commented on issue #11751: [FLINK-16587][network] Provide the method for getting unconsumed buffer from RecordDeserializer URL: https://github.com/apache/flink/pull/11751#issuecomment-614003050 I applied your changes @AHeise . I also have found & fixed another bug. Take a look at the new `testLargeSpanningRecordUnconsumedBufferWithLeftOverBytes` test case and modified `org.apache.flink.runtime.io.network.api.serialization.SpillingAdaptiveSpanningRecordDeserializer.SpanningWrapper#getUnconsumedSegment` ``` } else if (recordLength != -1) { int leftOverSize = leftOverLimit - leftOverStart; int unconsumedSize = Integer.BYTES + accumulatedRecordBytes + leftOverSize; DataOutputSerializer serializer = new DataOutputSerializer(unconsumedSize); serializer.writeInt(recordLength); serializer.write(buffer, 0, accumulatedRecordBytes); if (leftOverSize > 0) { serializer.write(checkNotNull(leftOverData), leftOverStart, leftOverSize); } MemorySegment segment = MemorySegmentFactory.allocateUnpooledSegment(unconsumedSize); segment.put(0, serializer.getSharedBuffer(), 0, segment.size()); return Optional.of(segment); } ``` branch
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
