noseglid commented on code in PR #37751:
URL: https://github.com/apache/beam/pull/37751#discussion_r3813549358


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1.java:
##########
@@ -2340,6 +2340,7 @@ public void processElement(ProcessContext c, 
BoundedWindow window) throws Except
 
       if (!uniqueMutationKeys.add(getKey(mutation))) {
         flushBatch(contextAdapter);
+        uniqueMutationKeys.add(getKey(mutation));

Review Comment:
   After closer inspection I don't think this can fail. If it fails, the 
invariant that only the hash set is modified by this class would be violated.
   
   I will add an assert that adding succeeds.



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

Reply via email to