zuston commented on code in PR #1652:
URL:
https://github.com/apache/incubator-uniffle/pull/1652#discussion_r1574421315
##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java:
##########
@@ -1201,61 +1209,75 @@ public synchronized boolean
reassignAllShuffleServersForWholeStage(
// this is only valid on driver side that exposed to being invoked by grpc
server
@Override
- public ShuffleServerInfo reassignFaultyShuffleServerForTasks(
- int shuffleId, Set<Integer> partitionIds, String faultyShuffleServerId) {
+ public ShuffleHandleInfo reassignFaultyShuffleServerForTasks(
+ int shuffleId,
+ Set<Integer> partitionIds,
+ String faultyShuffleServerId,
+ Set<Integer> needLoadBalancePartitionIds) {
ShuffleHandleInfo handleInfo = shuffleIdToShuffleHandleInfo.get(shuffleId);
synchronized (handleInfo) {
// find out whether this server has been marked faulty in this shuffle
// if it has been reassigned, directly return the replacement server.
// otherwise, it should request new servers to reassign
- Set<ShuffleServerInfo> replacements =
- handleInfo.getExistingReplacements(faultyShuffleServerId);
+ Set<ShuffleServerInfo> replacements =
handleInfo.getReplacements(faultyShuffleServerId);
if (replacements == null) {
- replacements = requestServersForTask(shuffleId, partitionIds,
faultyShuffleServerId);
+ int requiredServerNum = 1;
+ if (CollectionUtils.isNotEmpty(needLoadBalancePartitionIds)) {
+ requiredServerNum = partitionReassignLoadBalanceServerNum;
+ }
+ Set<String> faultyServers = new
HashSet<>(handleInfo.listFaultyServers());
+ faultyServers.add(faultyShuffleServerId);
+ replacements =
+ reassignServerForTask(shuffleId, partitionIds, faultyServers,
requiredServerNum);
}
- handleInfo.updateReassignment(partitionIds, faultyShuffleServerId,
replacements);
+ handleInfo.updateAssignment(
+ partitionIds, faultyShuffleServerId, replacements,
needLoadBalancePartitionIds);
Review Comment:
Updated. Please review again.
--
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]