This is an automated email from the ASF dual-hosted git repository. w41ter pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new 707d78654b6 [improve](restore) Log create replica task progress #42350 (#42966) 707d78654b6 is described below commit 707d78654b677209db0c91ab8bc43af1a69883d9 Author: walter <w41te...@gmail.com> AuthorDate: Thu Oct 31 14:35:07 2024 +0800 [improve](restore) Log create replica task progress #42350 (#42966) cherry pick from #42350 --- .../main/java/org/apache/doris/backup/RestoreJob.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java b/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java index 3c025e4590c..4abf4d3aa3c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java @@ -927,11 +927,23 @@ public class RestoreJob extends AbstractJob { } // estimate timeout - long timeout = DbUtil.getCreateReplicasTimeoutMs(numBatchTasks); + long timeout = DbUtil.getCreateReplicasTimeoutMs(numBatchTasks) / 1000; try { - LOG.info("begin to send create replica tasks to BE for restore. total {} tasks. timeout: {}", + LOG.info("begin to send create replica tasks to BE for restore. total {} tasks. timeout: {}s", numBatchTasks, timeout); - ok = latch.await(timeout, TimeUnit.MILLISECONDS); + for (long elapsed = 0; elapsed <= timeout; elapsed++) { + if (latch.await(1, TimeUnit.SECONDS)) { + ok = true; + break; + } + if (state != RestoreJobState.PENDING) { // user cancelled + return; + } + if (elapsed % 5 == 0) { + LOG.info("waiting {} create replica tasks for restore to finish, total {} tasks, elapsed {}s", + latch.getCount(), numBatchTasks, elapsed); + } + } } catch (InterruptedException e) { LOG.warn("InterruptedException: ", e); ok = false; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org