This is an automated email from the ASF dual-hosted git repository. shaofengshi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 82cf3096e5cac09eb25c217629f4e440266d3b86 Author: chao long <wayn...@qq.com> AuthorDate: Tue Sep 25 16:42:54 2018 +0800 KYLIN-3584 Correct lazy initialization of DefaultScheduler.INSTANCE --- .../java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java index c243757..df3f6fa 100644 --- a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java +++ b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DefaultScheduler.java @@ -51,7 +51,11 @@ public class DefaultScheduler implements Scheduler<AbstractExecutable>, Connecti public static DefaultScheduler getInstance() { if (INSTANCE == null) { - INSTANCE = createInstance(); + synchronized (DefaultScheduler.class) { + if (INSTANCE == null) { + INSTANCE = createInstance(); + } + } } return INSTANCE; }