XComp commented on a change in pull request #15049:
URL: https://github.com/apache/flink/pull/15049#discussion_r592480608



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/util/BoundedFIFOQueue.java
##########
@@ -102,11 +102,12 @@ private BoundedFIFOQueue(int maxSize, Iterable<T> 
initialElements, int initialEl
      * @throws NullPointerException If {@code null} is passed as an element.
      */
     public void add(T element) {
-        elementCount++;
-        elements.add(Preconditions.checkNotNull(element));
+        if (elements.add(Preconditions.checkNotNull(element))) {

Review comment:
       This was refactored as part of the `elementCount` revert




----------------------------------------------------------------
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]


Reply via email to