Skip to content

Commit

Permalink
11
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukang-Lian committed Sep 3, 2024
1 parent 7bdfa60 commit 9807c0a
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,11 @@ protected Object compaction(HttpServletRequest request, HttpServletResponse resp
// both tablet id and table id are not empty, return err.
return ResponseEntityBuilder.badRequest("tablet id and table id can not be set at the same time!");
} else {
Tablet tablet = Env.getCurrentEnv().getInternalCatalog().getTabletByTabletId(Long.valueOf(tabletId));
if (tablet == null) {
return new RestBaseResult("Tablet not found. Tablet id: " + tabletId);
}
List<Replica> replicaList = tablet.getReplicas();
List<Replica> replicaList = Env.getCurrentEnv().getTabletInvertedIndex()
.getReplicasByTabletId(Long.parseLong(tabletId));
for (Replica replica : replicaList) {
Backend backend = Env.getCurrentSystemInfo().getBackend(replica.getBackendId());
sendRequestToBe(request, backend, tablet.getId());
sendRequestToBe(request, backend, Long.parseLong(tabletId));
}
}
}
Expand Down

0 comments on commit 9807c0a

Please sign in to comment.