You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/07/28 17:29:36 UTC

[GitHub] [beam] steveniemitz commented on a change in pull request #15235: [BEAM-7745] Avoid uncached state fetches for streaming side-inputs

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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org