[ 
https://issues.apache.org/jira/browse/BEAM-13015?focusedWorklogId=671796&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-671796
 ]

ASF GitHub Bot logged work on BEAM-13015:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Oct/21 04:19
            Start Date: 29/Oct/21 04:19
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #15807:
URL: https://github.com/apache/beam/pull/15807#discussion_r738922064



##########
File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/data/BeamFnDataClient.java
##########
@@ -34,28 +33,36 @@
  */
 public interface BeamFnDataClient {
   /**
-   * Registers the following inbound receiver for the provided instruction id 
and target.
+   * Registers the following inbound receiver for the provided instruction id.
    *
    * <p>The provided coder is used to decode inbound elements. The decoded 
elements are passed to
    * the provided receiver. Any failure during decoding or processing of the 
element will complete
    * the returned future exceptionally. On successful termination of the 
stream, the returned future
    * is completed successfully.
    *
    * <p>The receiver is not required to be thread safe.
+   *
+   * <p>Receivers for successfully processed bundles must be unregistered. See 
{@link
+   * #unregisterReceiver} for details.

Review comment:
       I wanted to make the caller of register responsible for the clean-up on 
success, putting it in another object seemed to hide how the code worked.
   
   On a minor note there was a minor reduction in how much state we needed to 
mutate and additional objects we needed to create and track related to having 
some kind of "unregister" handle.




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 671796)
    Time Spent: 10h  (was: 9h 50m)

> Optimize Java SDK harness
> -------------------------
>
>                 Key: BEAM-13015
>                 URL: https://issues.apache.org/jira/browse/BEAM-13015
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-harness
>            Reporter: Luke Cwik
>            Assignee: Luke Cwik
>            Priority: P2
>          Time Spent: 10h
>  Remaining Estimate: 0h
>
> Use profiling tools to remove bundle processing overhead in the SDK harness.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to