yl09099 commented on code in PR #1260:
URL:
https://github.com/apache/incubator-uniffle/pull/1260#discussion_r1369742287
##########
client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java:
##########
@@ -355,16 +354,36 @@ public SendShuffleDataResult sendShuffleData(
}
}
/** Records the ShuffleServer that successfully or failed to send blocks */
- Map<Long, List<ShuffleServerInfo>> blockIdSendSuccessTracker =
JavaUtils.newConcurrentMap();
- Map<Long, List<ShuffleServerInfo>> blockIdsSendFailTracker =
JavaUtils.newConcurrentMap();
+ // we assume that most of the blocks can be sent successfully
+ // so initialize the map at first without concurrency insurance
+ // AtomicInteger is enough to reflect value changes in other threads
+ Map<Long, AtomicInteger> blockIdsSendSuccessTracker = Maps.newHashMap();
Review Comment:
BlockIdsSendSuccessTracker object should have concurrency issues? Use
concurrentMap?
--
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]