Skip to content

Commit

Permalink
Shuffle server list for MultiReplicaClientReadHandler to improve read…
Browse files Browse the repository at this point in the history
… serve performance
  • Loading branch information
maobaolong committed Aug 19, 2024
1 parent 13fc984 commit d88566c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.uniffle.storage.handler.impl;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.roaringbitmap.longlong.Roaring64NavigableMap;
Expand Down Expand Up @@ -49,7 +51,9 @@ public MultiReplicaClientReadHandler(
this.handlers = handlers;
this.blockIdBitmap = blockIdBitmap;
this.processedBlockIds = processedBlockIds;
this.shuffleServerInfos = shuffleServerInfos;
List<ShuffleServerInfo> shuffledServerList = new ArrayList<>(shuffleServerInfos);
Collections.shuffle(shuffledServerList);
this.shuffleServerInfos = shuffledServerList;
}

@Override
Expand Down

0 comments on commit d88566c

Please sign in to comment.