ibzib commented on a change in pull request #12093:
URL: https://github.com/apache/beam/pull/12093#discussion_r446418399



##########
File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java
##########
@@ -637,6 +737,28 @@ private void processElementForParDo(WindowedValue<InputT> 
elem) {
   }
 
   private void processElementForPairWithRestriction(WindowedValue<InputT> 
elem) {
+    currentElement = elem;
+    try {
+      currentRestriction = 
doFnInvoker.invokeGetInitialRestriction(processContext);
+      outputTo(
+          mainOutputConsumers,
+          (WindowedValue)
+              elem.withValue(
+                  KV.of(
+                      elem.getValue(),
+                      KV.of(
+                          currentRestriction,
+                          
doFnInvoker.invokeGetInitialWatermarkEstimatorState(processContext)))));
+    } finally {
+      currentElement = null;
+      currentRestriction = null;

Review comment:
       I noticed currentWindow isn't set to null here, where it was before. 
Same with processElementForWindowObservingPairWithRestriction. Why is that?




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


Reply via email to