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

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

                Author: ASF GitHub Bot
            Created on: 10/May/21 23:49
            Start Date: 10/May/21 23:49
    Worklog Time Spent: 10m 
      Work Description: y1chi commented on a change in pull request #14741:
URL: https://github.com/apache/beam/pull/14741#discussion_r629753007



##########
File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/status/BeamFnStatusClient.java
##########
@@ -42,9 +44,12 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class BeamFnStatusClient {
+public class BeamFnStatusClient implements AutoCloseable {
+  private static final Object COMPLETED = new Object();
   private final StreamObserver<WorkerStatusResponse> outboundObserver;
   private final BundleProcessorCache processBundleCache;
+  private final ManagedChannel channel;
+  private final CompletableFuture<Object> inboundObserverCompletion;

Review comment:
       Added logging and used the return object.




-- 
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: 594271)
    Time Spent: 50m  (was: 40m)

> BeamFnStatusClient managed channel not properly shutdown.
> ---------------------------------------------------------
>
>                 Key: BEAM-12294
>                 URL: https://issues.apache.org/jira/browse/BEAM-12294
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-harness
>            Reporter: Yichi Zhang
>            Assignee: Yichi Zhang
>            Priority: P2
>             Fix For: 2.30.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Example worker error:
>  
> {code:java}
> *~*~*~ Channel ManagedChannelImpl{logId=7, target=localhost:12374} was not 
> shutdown properly!!! ~*~*~* Make sure to call shutdown()/shutdownNow() and 
> wait until awaitTermination() returns true.
> exception: "java.lang.RuntimeException: ManagedChannel allocation site
>       at 
> org.apache.beam.vendor.grpc.v1p26p0.io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init>(ManagedChannelOrphanWrapper.java:94)
>       at 
> org.apache.beam.vendor.grpc.v1p26p0.io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:52)
>       at 
> org.apache.beam.vendor.grpc.v1p26p0.io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:43)
>       at 
> org.apache.beam.vendor.grpc.v1p26p0.io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:524)
>       at 
> org.apache.beam.sdk.fn.channel.ManagedChannelFactory$InterceptedManagedChannelFactory.forDescriptor(ManagedChannelFactory.java:107)
>       at 
> org.apache.beam.fn.harness.status.BeamFnStatusClient.<init>(BeamFnStatusClient.java:57)
>       at org.apache.beam.fn.harness.FnHarness.main(FnHarness.java:279)
>       at org.apache.beam.fn.harness.FnHarness.main(FnHarness.java:183)
>       at org.apache.beam.fn.harness.FnHarness.main(FnHarness.java:143)
>       at org.apache.beam.fn.harness.FnHarness.main(FnHarness.java:107)
> {code}



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

Reply via email to