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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]