You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by xx...@apache.org on 2022/05/16 03:14:28 UTC

[kylin] branch kylin3 updated: KYLIN-5180 Repair the dictionary lock bug when multi job building

This is an automated email from the ASF dual-hosted git repository.

xxyu pushed a commit to branch kylin3
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/kylin3 by this push:
     new f4a8125133 KYLIN-5180 Repair the dictionary lock bug when multi job building
f4a8125133 is described below

commit f4a81251338f9bb3e0cf146b04bfe54fa665b916
Author: yhj <10...@qq.com>
AuthorDate: Mon May 16 10:04:14 2022 +0800

    KYLIN-5180 Repair the dictionary lock bug when multi job building
---
 .../src/main/java/org/apache/kylin/dict/GlobalDictionaryBuilder.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/core-dictionary/src/main/java/org/apache/kylin/dict/GlobalDictionaryBuilder.java b/core-dictionary/src/main/java/org/apache/kylin/dict/GlobalDictionaryBuilder.java
index ba31e2b7b6..98cd642fc9 100644
--- a/core-dictionary/src/main/java/org/apache/kylin/dict/GlobalDictionaryBuilder.java
+++ b/core-dictionary/src/main/java/org/apache/kylin/dict/GlobalDictionaryBuilder.java
@@ -59,12 +59,11 @@ public class GlobalDictionaryBuilder implements IDictionaryBuilder {
             lock.lock(lockPath, Long.MAX_VALUE);
             this.builder = new AppendTrieDictionaryBuilder(baseDir, maxEntriesPerSlice, true);
         } catch (Throwable e) {
-            throw new RuntimeException(
-                    String.format(Locale.ROOT, "Failed to create global dictionary on %s ", sourceColumn), e);
-        } finally {
             if (lock.isLockedByMe(lockPath)) {
                 lock.unlock(lockPath);
             }
+            throw new RuntimeException(
+                    String.format(Locale.ROOT, "Failed to create global dictionary on %s ", sourceColumn), e);
         }
         this.baseId = baseId;
     }