You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/20 02:08:27 UTC

[GitHub] [flink] KarmaGYZ commented on a change in pull request #10903: [FLINK-15549][API/DataSet] Fix Integer overflow in ResettableIterator*.

KarmaGYZ 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_r368346480
 
 

 ##########
 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:
   We should avoid code duplication. Maybe it's better to add a utility function.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services