reswqa commented on code in PR #21209:
URL: https://github.com/apache/flink/pull/21209#discussion_r1014315054
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/hybrid/HsFullSpillingStrategyTest.java:
##########
@@ -149,9 +147,9 @@ void testDecideActionWithGlobalInfo() {
Map<Integer, List<BufferIndexAndChannel>> expectedReleaseBuffers = new
HashMap<>();
expectedReleaseBuffers.put(
- subpartition1, new ArrayList<>(subpartitionBuffers1.subList(0,
2)));
+ subpartition1, new ArrayList<>(subpartitionBuffers1.subList(0,
3)));
expectedReleaseBuffers.put(
- subpartition2, new ArrayList<>(subpartitionBuffers2.subList(1,
3)));
+ subpartition2, new ArrayList<>(subpartitionBuffers2.subList(1,
4)));
Review Comment:
> And please check createBufferIndexAndChannelsList. It's creating memory
segment and network buffer for nothing.
good catch, a previous refactoring changed `BufferWithIdentity` into
`BufferIndexAndChannel`, so there is no need to create a real buffer.
Unfortunately, I forgot to remove the useless code here.
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/hybrid/HsFullSpillingStrategyTest.java:
##########
@@ -149,9 +147,9 @@ void testDecideActionWithGlobalInfo() {
Map<Integer, List<BufferIndexAndChannel>> expectedReleaseBuffers = new
HashMap<>();
expectedReleaseBuffers.put(
- subpartition1, new ArrayList<>(subpartitionBuffers1.subList(0,
2)));
+ subpartition1, new ArrayList<>(subpartitionBuffers1.subList(0,
3)));
expectedReleaseBuffers.put(
- subpartition2, new ArrayList<>(subpartitionBuffers2.subList(1,
3)));
+ subpartition2, new ArrayList<>(subpartitionBuffers2.subList(1,
4)));
Review Comment:
> And please check createBufferIndexAndChannelsList. It's creating memory
segment and network buffer for nothing.
good catch, a previous refactoring changed `BufferWithIdentity` into
`BufferIndexAndChannel`, so there is no need to create a real buffer.
Unfortunately, I forgot to remove the useless code here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]