wForget opened a new pull request, #1367:
URL: https://github.com/apache/incubator-uniffle/pull/1367

   <!--
   1. Title: [#<issue>] <type>(<scope>): <subject>
      Examples:
        - "[#123] feat(operator): support xxx"
        - "[#233] fix: check null before access result in xxx"
        - "[MINOR] refactor: fix typo in variable name"
        - "[MINOR] docs: fix typo in README"
        - "[#255] test: fix flaky test NameOfTheTest"
      Reference: https://www.conventionalcommits.org/en/v1.0.0/
   2. Contributor guidelines:
      https://github.com/apache/incubator-uniffle/blob/master/CONTRIBUTING.md
   3. If the PR is unfinished, please mark this PR as draft.
   -->
   
   ### What changes were proposed in this pull request?
   
   Fix NPE for ShuffleWriteClientImpl.unregisterShuffle.
   
   ### Why are the changes needed?
   
   Since the `id` of `RssShuffleManager` in Executor is assigned in 
`getWriter`, this means that the `id` may be null before `getWriter`, so this 
may cause NPE to occur in `ShuffleWriteClientImpl.unregisterShuffle`.
   
   error log:
   
   ```
   23/12/12 14:25:47 ERROR RssShuffleManager: Errors on closing shuffle write 
client
   java.lang.NullPointerException
        at 
java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
        at 
org.apache.uniffle.client.impl.ShuffleWriteClientImpl.unregisterShuffle(ShuffleWriteClientImpl.java:751)
        at 
org.apache.spark.shuffle.RssShuffleManager.stop(RssShuffleManager.java:591)
        at org.apache.spark.SparkEnv.stop(SparkEnv.scala:90)
        at org.apache.spark.executor.Executor.stop(Executor.scala:335)
        at 
org.apache.spark.executor.CoarseGrainedExecutorBackend$$anonfun$receive$1$$anon$1.run(CoarseGrainedExecutorBackend.scala:203)
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   (Please test your changes, and provide instructions on how to test it:
     1. If you add a feature or fix a bug, add a test to cover your changes. 
     2. If you fix a flaky test, repeat it for many times to prove it works.)
   


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