wsry commented on a change in pull request #15259:
URL: https://github.com/apache/flink/pull/15259#discussion_r603068469
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartition.java
##########
@@ -94,11 +94,17 @@
*/
private final SortMergeResultPartitionReadScheduler readScheduler;
- /** Number of guaranteed network buffers can be used by {@link
#currentSortBuffer}. */
+ /**
+ * Number of guaranteed network buffers can be used by {@link
#unicastSortBuffer} and {@link
+ * #broadcastSortBuffer}.
+ */
private int numBuffersForSort;
- /** Current {@link SortBuffer} to append records to. */
- private SortBuffer currentSortBuffer;
+ /** {@link SortBuffer} for records sent by {@link
#broadcastRecord(ByteBuffer)}. */
+ private SortBuffer broadcastSortBuffer;
+
+ /** {@link SortBuffer} for records sent by {@link #emitRecord(ByteBuffer,
int)}. */
+ private SortBuffer unicastSortBuffer;
Review comment:
It make the ResultPartition can switch between unicast mode and
broadcast mode dynamically and we do not need to assume we only have broadcast
data or unicast data. (pipeline and bounded blocking adopt the same
implementation)
--
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]