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 (#51828)

Signed-off-by: gengjun-git <[email protected]>
  • Loading branch information
gengjun-git authored Oct 12, 2024
1 parent ccd6bd2 commit b550d07
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,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 b550d07

Please sign in to comment.