Skip to content

Commit

Permalink
[BugFix] Fix the incomplete ok semantic in runPendingJob (#9160)
Browse files Browse the repository at this point in the history
The code paths will not enter the right branch when the status of countDownLatch is not ok. If BE failed to create tablet, runPendingJob will transform to next phase as normal, it's not ok. Instead this case should throw an AlterCancelException.
  • Loading branch information
Linkerist authored and chaoyli committed Aug 11, 2022
1 parent a9abeb1 commit 3532a37
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ protected void runPendingJob() throws AlterCancelException {
Config.max_create_table_timeout_second * 1000L);
boolean ok = false;
try {
ok = countDownLatch.await(timeout, TimeUnit.MILLISECONDS);
ok = countDownLatch.await(timeout, TimeUnit.MILLISECONDS) && countDownLatch.getStatus().ok();
} catch (InterruptedException e) {
LOG.warn("InterruptedException: ", e);
ok = false;
Expand Down

0 comments on commit 3532a37

Please sign in to comment.