BePPPower commented on code in PR #47604:
URL: https://github.com/apache/doris/pull/47604#discussion_r1957689529


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -2547,6 +2547,10 @@ public long saveExportJob(CountingDataOutputStream dos, 
long checksum) throws IO
         long curTime = System.currentTimeMillis();
         List<ExportJob> jobs = exportMgr.getJobs().stream().filter(t -> 
!t.isExpired(curTime))
                 .collect(Collectors.toList());
+        jobs.sort(Comparator.comparingLong(ExportJob::getCreateTimeMs));
+        while (jobs.size() > Config.max_export_history_job_num) {
+            jobs.remove(0);

Review Comment:
   done



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to