You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/03/17 14:21:31 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #3130: [Alter]Clear expire alterJobV2

morningman commented on a change in pull request #3130: [Alter]Clear expire alterJobV2
URL: https://github.com/apache/incubator-doris/pull/3130#discussion_r393714324
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/alter/AlterHandler.java
 ##########
 @@ -119,6 +121,30 @@ public AlterJobV2 getUnfinishedAlterJobV2ByJobId(long jobId) {
         return this.alterJobsV2;
     }
 
+    private void clearExpireFinishedOrCancelledAlterJobs() {
+        long curTime = System.currentTimeMillis();
+        // clean history job
+        Iterator<AlterJob> iter = finishedOrCancelledAlterJobs.iterator();
+        while (iter.hasNext()) {
+            AlterJob historyJob = iter.next();
+            if ((curTime - historyJob.getCreateTimeMs()) / 1000 > Config.history_job_keep_max_second) {
+                iter.remove();
+                LOG.info("remove history {} job[{}]. created at {}", historyJob.getType(),
 
 Review comment:
   change to "finish at"?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org