Skip to content

Commit

Permalink
[BugFix] Fix NullPointerException in getTabletsInHighLoadPath when se…
Browse files Browse the repository at this point in the history
…lect tablets to balance (backport #51828) (#51850)

Co-authored-by: gengjun-git <gengjun@starrocks.com>
  • Loading branch information
mergify[bot] and gengjun-git authored Oct 12, 2024
1 parent ae4dfe0 commit 2ecb310
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,12 @@ public List<Long> getTabletsInHighLoadPath(List<Long> tablets) {
if (replica == null) {
continue;
}
int sortIndex = pathSortIndex.get(replica.getPathHash());
Integer sortIndex = pathSortIndex.get(replica.getPathHash());
if (sortIndex == null) {
LOG.warn("Can not find path for tablet: {} on backend: {} by path hash: {}",
tabletId, this.backendId, replica.getPathHash());
continue;
}
if (sortIndex > lastHighLoadIndex) {
continue;
}
Expand Down

0 comments on commit 2ecb310

Please sign in to comment.