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

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

                Author: ASF GitHub Bot
            Created on: 08/Apr/21 19:49
            Start Date: 08/Apr/21 19:49
    Worklog Time Spent: 10m 
      Work Description: scwhittle commented on pull request #14480:
URL: https://github.com/apache/beam/pull/14480#issuecomment-816118141


   R: @amaliujia @kennknowles 
   This could go in instead of https://github.com/apache/beam/pull/14458 or 
after it.  Just wanted to get some eyes on it earlier
   
   The new InboundDataClient method runWhenComplete doesn't seem the cleanest 
to me but seems like it would work.  Alternatively we could change that 
interface to expose a CompletableFuture itself since all the implementations 
seem to use that. That could avoid the proliferation of awaitWhenComplete, 
runWhenComplete that mirror the CompletableFuture methods.


-- 
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:
[email protected]


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

    Worklog Id:     (was: 579511)
    Time Spent: 20m  (was: 10m)

> QueuingBeamFnDataClient adds polling latency to completing bundle processing
> ----------------------------------------------------------------------------
>
>                 Key: BEAM-12118
>                 URL: https://issues.apache.org/jira/browse/BEAM-12118
>             Project: Beam
>          Issue Type: Bug
>          Components: java-fn-execution
>            Reporter: Sam Whittle
>            Assignee: Sam Whittle
>            Priority: P2
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently the inboundDataClients are registered with recieve, and they add 
> data to a queue. There is no explicit indication from the clients that they 
> are no longer going to add values to the queue.
> Within QueueingBeamFnDataClient.drainAndBlock the queue is therefore polled 
> and if nothing is present all clients are polled to see if they are complete.
> This design makes for unfortunate tradeoffs on poll timeout:
> - cpu wasted with small timeout
> - additional latency in noticing we have completed with larger timeout
> With the existing InboundDataClient interface, we could have a separate 
> thread call awaitCompletion on all of the clients and then shutdown the queue 
> (adding a poison pill perhaps)
> Or we could modify InboundDataClient interface to allow registering iterest 
> in when the client is done producing elements.  The existing clients all seem 
> based upon futures which allow that.



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

Reply via email to