maobaolong commented on PR #2091:
URL:
https://github.com/apache/incubator-uniffle/pull/2091#issuecomment-2323674337
@xianjingfeng Do you think `Collections.synchronizedList` could be better?
As ShuffleWriteClientImpl#recordFailedBlocks add all the failed blocks to
the list, if we replace to `CopyOnWriteArrayList`, the `recordFailedBlocks`
performance will get worse as each `add` will cause `new list & copy`.
```java
void recordFailedBlocks(
FailedBlockSendTracker blockIdsSendFailTracker,
Map<ShuffleServerInfo, Map<Integer, Map<Integer,
List<ShuffleBlockInfo>>>> serverToBlocks,
ShuffleServerInfo shuffleServerInfo,
StatusCode statusCode) {
serverToBlocks.getOrDefault(shuffleServerInfo,
Collections.emptyMap()).values().stream()
.flatMap(innerMap -> innerMap.values().stream())
.flatMap(List::stream)
.forEach(block -> blockIdsSendFailTracker.add(block,
shuffleServerInfo, statusCode));
}
```
I'm not sure this is a read is more, write is less scenario. @zuston If I
support `Partition split` leverage `blockIdsSendFailTracker`, do you think the
problem getting worse that now?
--
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]