killxdcj commented on a change in pull request #10903:
[FLINK-15549][API/DataSet] Fix Integer overflow in ResettableIterator*.
URL: https://github.com/apache/flink/pull/10903#discussion_r368352052
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/operators/resettable/SpillingResettableMutableObjectIterator.java
##########
@@ -204,8 +204,16 @@ public void consumeAndCacheRemainingData() throws
IOException {
} catch (IOException e) {
throw new
RuntimeException("SpillingIterator: Error writing element to buffer.", e);
}
- this.elementCount++;
+ increaseElementCount();
}
}
}
+
+ private void increaseElementCount() {
Review comment:
Hi, @KarmaGYZ Thanks for your comment.
SpillingResettableIterator and SpillingResettableMutableObjectIterator both
implemented ResettableIterator, but they are two separate components. Although
the logic of adding elementCount is somewhat similar, it is actually related to
their respective implementation logic, so i think there is no need to share it.
----------------------------------------------------------------
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