xy720 commented on a change in pull request #6448: URL: https://github.com/apache/incubator-doris/pull/6448#discussion_r693399525
########## File path: fe/fe-core/src/main/java/org/apache/doris/load/DeleteHandler.java ########## @@ -709,6 +745,51 @@ public void write(DataOutput out) throws IOException { public static DeleteHandler read(DataInput in) throws IOException { String json = Text.readString(in); - return GsonUtils.GSON.fromJson(json, DeleteHandler.class); + DeleteHandler deleteHandler = GsonUtils.GSON.fromJson(json, DeleteHandler.class); + deleteHandler.removeOldDeleteInfos(); Review comment: Hi, there is problem in here. When we are load image, we shouldn't write the editLog, or else replayRemoveOldDeleteInfos() method will triggered after loading image immediately. ########## File path: fe/fe-core/src/main/java/org/apache/doris/load/DeleteHandler.java ########## @@ -709,6 +745,51 @@ public void write(DataOutput out) throws IOException { public static DeleteHandler read(DataInput in) throws IOException { String json = Text.readString(in); - return GsonUtils.GSON.fromJson(json, DeleteHandler.class); + DeleteHandler deleteHandler = GsonUtils.GSON.fromJson(json, DeleteHandler.class); + deleteHandler.removeOldDeleteInfos(); + return deleteHandler; + } + + /** + * FE Master timing, or when any FE replay meta triggers DeleteInfo cleanup + */ + public void removeOldDeleteInfos() { + Timestamp timestamp = new Timestamp(); + removeOldDeleteInfos(timestamp); + Catalog.getCurrentCatalog().getEditLog().logRemoveOldDeleteInfos(timestamp); Review comment: I think you can add a judgment here that when Fe is loading image, it will not execute this line. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org