cxzl25 opened a new pull request, #46506:
URL: https://github.com/apache/spark/pull/46506

   ### What changes were proposed in this pull request?
   This PR aims to add a check for `TransportChannelHandler` to be non-null in 
the `TransportClientFactory.createClient` method.
   
   ### Why are the changes needed?
   
   Line 178 synchronized (handler) , handler == null
   
   
org.apache.spark.network.client.TransportClientFactory#createClient(java.lang.String,
 int, boolean)
   ```java
         TransportChannelHandler handler = cachedClient.getChannel().pipeline()
           .get(TransportChannelHandler.class);
         synchronized (handler) {
           handler.getResponseHandler().updateTimeOfLastRequest();
         }
   ```
   
   ```java
   org.apache.spark.shuffle.FetchFailedException
        at 
org.apache.spark.storage.ShuffleBlockFetcherIterator.throwFetchFailedException(ShuffleBlockFetcherIterator.scala:1180)
        at 
org.apache.spark.storage.ShuffleBlockFetcherIterator.next(ShuffleBlockFetcherIterator.scala:913)
        at 
org.apache.spark.storage.ShuffleBlockFetcherIterator.next(ShuffleBlockFetcherIterator.scala:84)
        at 
org.apache.spark.util.CompletionIterator.next(CompletionIterator.scala:29)
   
   Caused by: java.lang.NullPointerException
        at 
org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:178)
        at 
org.apache.spark.network.shuffle.ExternalBlockStoreClient.lambda$fetchBlocks$0(ExternalBlockStoreClient.java:128)
        at 
org.apache.spark.network.shuffle.RetryingBlockTransferor.transferAllOutstanding(RetryingBlockTransferor.java:154)
        at 
org.apache.spark.network.shuffle.RetryingBlockTransferor.start(RetryingBlockTransferor.java:133)
        at 
org.apache.spark.network.shuffle.ExternalBlockStoreClient.fetchBlocks(ExternalBlockStoreClient.java:139)
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to