baiyangtx commented on code in PR #2720:
URL: https://github.com/apache/amoro/pull/2720#discussion_r1560540299
##########
ams/server/src/main/java/com/netease/arctic/server/optimizing/OptimizingQueue.java:
##########
@@ -544,27 +544,32 @@ public void commit() {
taskMap.size(),
taskMap.values());
+ boolean needCleanupTasks = false;
lock.lock();
try {
if (hasCommitted) {
LOG.warn("{} has already committed, give up",
tableRuntime.getTableIdentifier());
throw new IllegalStateException("repeat commit, and last error " +
failedReason);
}
- hasCommitted = true;
- buildCommit().commit();
- status = Status.SUCCESS;
- endTime = System.currentTimeMillis();
- persistProcessCompleted(true);
- } catch (Exception e) {
- LOG.error("{} Commit optimizing failed ",
tableRuntime.getTableIdentifier(), e);
- status = Status.FAILED;
- failedReason = ExceptionUtil.getErrorMessage(e, 4000);
- endTime = System.currentTimeMillis();
- persistProcessCompleted(false);
+ try {
+ hasCommitted = true;
Review Comment:
This field is belond to the Process, and marked the process has be committed
to avoid commit a process mulit times.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]