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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2e038f5  When coordinator leader change, clear the cached submitted 
job info
2e038f5 is described below

commit 2e038f5314f435a0200829f6095755b84ae1cd8f
Author: kliu3 <liu...@apache.org>
AuthorDate: Fri Jun 11 11:45:55 2021 +0800

    When coordinator leader change, clear the cached submitted job info
---
 .../apache/kylin/stream/coordinator/coordinate/BuildJobSubmitter.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/stream-coordinator/src/main/java/org/apache/kylin/stream/coordinator/coordinate/BuildJobSubmitter.java
 
b/stream-coordinator/src/main/java/org/apache/kylin/stream/coordinator/coordinate/BuildJobSubmitter.java
index 481e481..38cb511 100644
--- 
a/stream-coordinator/src/main/java/org/apache/kylin/stream/coordinator/coordinate/BuildJobSubmitter.java
+++ 
b/stream-coordinator/src/main/java/org/apache/kylin/stream/coordinator/coordinate/BuildJobSubmitter.java
@@ -89,6 +89,10 @@ public class BuildJobSubmitter implements Runnable {
 
     void restore() {
         logger.info("Restore job submitter");
+        // Clear the cache first, when the leader change
+        segmentBuildJobCheckList.clear();
+        cubeCheckList.clear();
+        // Restore job
         List<String> cubes = coordinator.getStreamMetadataStore().getCubes();
         for (String cube : cubes) {
             List<SegmentBuildState> segmentBuildStates = 
coordinator.getStreamMetadataStore()

Reply via email to