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

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

                Author: ASF GitHub Bot
            Created on: 10/Dec/19 02:49
            Start Date: 10/Dec/19 02:49
    Worklog Time Spent: 10m 
      Work Description: sunjincheng121 commented on pull request #10326: 
[BEAM-8929] Remove unnecessary exception handling in FnApiControlClie…
URL: https://github.com/apache/beam/pull/10326#discussion_r355821207
 
 

 ##########
 File path: 
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/FnApiControlClientPoolService.java
 ##########
 @@ -99,9 +99,6 @@ public static FnApiControlClientPoolService 
offeringClientsToPool(
       // We do not attempt to transactionally add the client to our internal 
list and offer it to
       // the sink.
       clientSink.put(headerAccessor.getSdkWorkerId(), newClient);
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
-      throw new RuntimeException(e);
 
 Review comment:
   This exception catch was added in 
[2017](https://github.com/apache/beam/commit/9ed655be780630e1218d185bd0d2ebfea099b988#diff-40daa607c5288b4785dada738d9de8ecR31).
 The purpose was to catch InterruptedException from `BlockingQueue # put (E 
var1) throws InterruptedException`. At present, the implementation of the code 
has changed from BlockingQueue to [ControlClientPool.Sink # 
put](https://github.com/apache/beam/blob/59b4b6d5318594c6fd7fae2dd6be2dd8aca972fa/runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/FnApiControlClientPoolService.java#L40).
 There is no chance of throwing an `InterruptedException`. So I think it is 
possible to delete the logic of this exception catch. Am i missing something 
here?
 
----------------------------------------------------------------
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: 356789)
    Time Spent: 40m  (was: 0.5h)

> Remove unnecessary exception handling in FnApiControlClientPoolService
> ----------------------------------------------------------------------
>
>                 Key: BEAM-8929
>                 URL: https://issues.apache.org/jira/browse/BEAM-8929
>             Project: Beam
>          Issue Type: Improvement
>          Components: java-fn-execution
>            Reporter: sunjincheng
>            Assignee: sunjincheng
>            Priority: Major
>             Fix For: 2.19.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The exception handling logic in 
> [FnApiControlClientPoolService|https://github.com/apache/beam/blob/c2f0d282337f3ae0196a7717712396a5a41fdde1/runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/FnApiControlClientPoolService.java#L102]
>  is unnecessary and could be removed.(Clean up usless code)



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

Reply via email to