Skip to content

Commit

Permalink
add detail for replica missing hint
Browse files Browse the repository at this point in the history
  • Loading branch information
yujun777 committed Oct 28, 2024
1 parent c387816 commit 6705132
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
import java.util.Optional;
import java.util.Queue;
import java.util.Set;
import java.util.stream.Collectors;

/**
* TabletScheduler saved the tablets produced by TabletChecker and try to schedule them.
Expand Down Expand Up @@ -1520,7 +1521,13 @@ private RootPathLoadStatistic doChooseAvailableDestPath(TabletSchedCtx tabletCtx
List<BePathLoadStatPair> allFitPaths =
!allFitPathsSameMedium.isEmpty() ? allFitPathsSameMedium : allFitPathsDiffMedium;
if (allFitPaths.isEmpty()) {
throw new SchedException(Status.UNRECOVERABLE, "unable to find dest path for new replica");
List<String> backendsInfo = Env.getCurrentSystemInfo().getAllClusterBackendsNoException().values().stream()
.filter(be -> be.getLocationTag() == tag)
.map(Backend::getDetailsForCreateReplica)
.collect(Collectors.toList());
throw new SchedException(Status.UNRECOVERABLE, String.format("unable to find dest path for new replica"
+ " for replica allocation { %s } with tag %s storage medium %s, backends on this tag is: %s",
tabletCtx.getReplicaAlloc(), tag, tabletCtx.getStorageMedium(), backendsInfo));
}

BePathLoadStatPairComparator comparator = new BePathLoadStatPairComparator(allFitPaths);
Expand Down

0 comments on commit 6705132

Please sign in to comment.