You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2024/02/16 06:34:26 UTC
(doris) branch master updated: [Improve](Job)Return directly when the job status does not need to change (#31028)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8aaf736ff92 [Improve](Job)Return directly when the job status does not need to change (#31028)
8aaf736ff92 is described below
commit 8aaf736ff9277caec98aab786fcc14b7e968a33b
Author: Calvin Kirs <ki...@apache.org>
AuthorDate: Fri Feb 16 14:34:19 2024 +0800
[Improve](Job)Return directly when the job status does not need to change (#31028)
---
fe/fe-core/src/main/java/org/apache/doris/job/base/AbstractJob.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/job/base/AbstractJob.java b/fe/fe-core/src/main/java/org/apache/doris/job/base/AbstractJob.java
index 091ac158c1c..78d7598bf13 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/job/base/AbstractJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/job/base/AbstractJob.java
@@ -244,11 +244,11 @@ public abstract class AbstractJob<T extends AbstractTask, C> implements Job<T, C
if (null == newJobStatus) {
throw new IllegalArgumentException("jobStatus cannot be null");
}
- String errorMsg = String.format("Can't update job %s status to the %s status",
- jobStatus.name(), newJobStatus.name());
if (jobStatus == newJobStatus) {
- throw new IllegalArgumentException(errorMsg);
+ return;
}
+ String errorMsg = String.format("Can't update job %s status to the %s status",
+ jobStatus.name(), newJobStatus.name());
if (newJobStatus.equals(JobStatus.RUNNING) && !jobStatus.equals(JobStatus.PAUSED)) {
throw new IllegalArgumentException(errorMsg);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org