steveniemitz commented on a change in pull request #15235:
URL: https://github.com/apache/beam/pull/15235#discussion_r678511336



##########
File path: 
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WindmillStateInternals.java
##########
@@ -474,9 +474,12 @@ private WindmillValue(
 
     @Override
     public void clear() {
-      modified = true;
+      // if the value was already null (because it was already cleared) then 
there's no need to
+      // mark this as modified again.  This will save having to persist a 
clear that does nothing.

Review comment:
       this change breaks a couple unit tests that were asserting the commit 
payload looked a certain way, but I'm don't think the change is actually wrong. 
 The state being cleared was never persisted, so clearing it again is a noop.  
I'll update the unit tests.




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