kw2542 commented on code in PR #22370:
URL: https://github.com/apache/beam/pull/22370#discussion_r929315986


##########
runners/samza/src/main/java/org/apache/beam/runners/samza/runtime/SamzaDoFnRunners.java:
##########
@@ -369,6 +419,7 @@ public void finishBundle() {
         // RemoteBundle close blocks until all results are received
         remoteBundle.close();
         emitResults();
+        emitMetrics();

Review Comment:
   metric calculation relies on state count, therefore, we cannot move it after 
clear the state. 
   
   on the other hand, if we preserve the count before clearing, we end up 
reading state count when we do not need emit metrics.
   
   as agreed offline, we will keep it as it is for now.



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