zjf2012 opened a new issue, #475:
URL: https://github.com/apache/incubator-uniffle/issues/475

   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   
   
   ### Search before asking
   
   - [X] I have searched in the 
[issues](https://github.com/apache/incubator-uniffle/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What would you like to be improved?
   
   For RssShuffleWriter, each task has unique instance of RssShuffleWriter. 
Thus, there is only one thread access its field, "partitionToBlockIds". It's 
inappropriate to use ConcurrentHashMap and ConcurrentHashSet like below.
   `
   this.partitionToBlockIds = Maps.newConcurrentMap();
   
   partitionToBlockIds.putIfAbsent(partitionId, Sets.newConcurrentHashSet());
   `
   
   ### How should we improve?
   
   We can just use simple HashMap and HashSet which avoid unnecessary locks.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!


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

Reply via email to