[ 
https://issues.apache.org/jira/browse/SPARK-27797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16846068#comment-16846068
 ] 

Marcelo Vanzin commented on SPARK-27797:
----------------------------------------

You're right. Looks just like some dead code in that case.

> Shuffle service metric "registeredConnections" not tracked correctly
> --------------------------------------------------------------------
>
>                 Key: SPARK-27797
>                 URL: https://issues.apache.org/jira/browse/SPARK-27797
>             Project: Spark
>          Issue Type: Bug
>          Components: Shuffle
>    Affects Versions: 3.0.0
>            Reporter: Marcelo Vanzin
>            Priority: Minor
>
> In {{ExternalShuffleBlockHandler}}:
> {code}
>     // Number of registered connections to the shuffle service
>     private Counter registeredConnections = new Counter();
>     public ShuffleMetrics() {
>       ...
>       allMetrics.put("numRegisteredConnections", registeredConnections);
>     }
> {code}
> But the counter that's actually updated is in {{TransportContext}}. The call 
> site is in {{TransportChannelHandler}}:
> {code}
>   @Override
>   public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
>     transportContext.getRegisteredConnections().inc();
>     super.channelRegistered(ctx);
>   }
>   @Override
>   public void channelUnregistered(ChannelHandlerContext ctx) throws Exception 
> {
>     transportContext.getRegisteredConnections().dec();
>     super.channelUnregistered(ctx);
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to