WencongLiu commented on code in PR #23863:
URL: https://github.com/apache/flink/pull/23863#discussion_r1415495161
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/tier/disk/DiskTierProducerAgent.java:
##########
@@ -223,9 +228,16 @@ private void releaseResources() {
}
}
- private Integer retrieveFirstBufferIndexInSegment(int subpartitionId, int
bufferIndex) {
- return firstBufferIndexInSegment.size() > subpartitionId
- ?
firstBufferIndexInSegment.get(subpartitionId).get(bufferIndex)
- : null;
+ private Integer getSegmentIdByIndexOfFirstBufferInSegment(int
subpartitionId, int bufferIndex) {
+ Integer segmentId;
+ try {
+ segmentId =
firstBufferIndexInSegment.get(subpartitionId).get(bufferIndex);
Review Comment:
Good point 🤔. Fixed.
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/hybrid/tiered/tier/disk/DiskTierProducerAgent.java:
##########
@@ -223,9 +228,16 @@ private void releaseResources() {
}
}
- private Integer retrieveFirstBufferIndexInSegment(int subpartitionId, int
bufferIndex) {
- return firstBufferIndexInSegment.size() > subpartitionId
- ?
firstBufferIndexInSegment.get(subpartitionId).get(bufferIndex)
- : null;
+ private Integer getSegmentIdByIndexOfFirstBufferInSegment(int
subpartitionId, int bufferIndex) {
+ Integer segmentId;
+ try {
+ segmentId =
firstBufferIndexInSegment.get(subpartitionId).get(bufferIndex);
Review Comment:
Good point 🤔. Fixed.
--
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]