Skip to content

Commit

Permalink
Merge 1aeb680 into a979a49
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangayqian committed Feb 18, 2020
2 parents a979a49 + 1aeb680 commit d771248
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 17 additions & 3 deletions core-job/src/main/java/org/apache/kylin/job/dao/ExecutableDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.kylin.common.persistence.JsonSerializer;
import org.apache.kylin.common.persistence.ResourceStore;
import org.apache.kylin.common.persistence.Serializer;
import org.apache.kylin.common.persistence.WriteConflictException;
import org.apache.kylin.common.util.AutoReadWriteLock;
import org.apache.kylin.job.exception.PersistentException;
import org.apache.kylin.job.execution.AbstractExecutable;
Expand Down Expand Up @@ -440,9 +441,22 @@ public void addJobOutput(ExecutableOutputPO output) throws PersistentException {

public void updateJobOutput(ExecutableOutputPO output) throws PersistentException {
try {
writeJobOutputResource(pathOfJobOutput(output.getUuid()), output);
if (!isTaskExecutableOutput(output.getUuid()))
executableOutputDigestMap.put(output.getUuid(), output);
int retry = 7;
while (retry-- > 0) {
try {
writeJobOutputResource(pathOfJobOutput(output.getUuid()), output);
if (!isTaskExecutableOutput(output.getUuid()))
executableOutputDigestMap.put(output.getUuid(), output);
return;
} catch (WriteConflictException e) {
if (retry <= 0) {
logger.error("Retry is out, till got error, abandoning...", e);
throw e;
}
logger.warn("Write conflict to update job output id:" + output.getUuid() + " retry remaining " + retry
+ ", will retry...");
}
}
} catch (IOException e) {
logger.error("error update job output id:" + output.getUuid(), e);
throw new PersistentException(e);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<!-- uncomment this on release -->
<!--<version>3.4.1</version>-->
<version>3.4.1</version>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit d771248

Please sign in to comment.