je-ik commented on a change in pull request #12155: URL: https://github.com/apache/beam/pull/12155#discussion_r453472751
########## File path: runners/direct-java/src/main/java/org/apache/beam/runners/direct/StatefulParDoEvaluatorFactory.java ########## @@ -128,19 +108,6 @@ public void cleanup() throws Exception { final DoFn<KV<K, InputT>, OutputT> doFn = application.getTransform().getDoFn(); final DoFnSignature signature = DoFnSignatures.getSignature(doFn.getClass()); - // If the DoFn is stateful, schedule state clearing. - // It is semantically correct to schedule any number of redundant clear tasks; the - // cache is used to limit the number of tasks to avoid performance degradation. - if (signature.stateDeclarations().size() > 0) { - for (final WindowedValue<?> element : inputBundle.getElements()) { - for (final BoundedWindow window : element.getWindows()) { - cleanupRegistry.get( - AppliedPTransformOutputKeyAndWindow.create( - application, (StructuralKey<K>) inputBundle.getKey(), window)); - } - } - } - Review comment: :+1: ---------------------------------------------------------------- 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