diff --git a/src/backend/job-backup/service-job-backup/src/main/java/com/tencent/bk/job/backup/archive/AbstractArchivist.java b/src/backend/job-backup/service-job-backup/src/main/java/com/tencent/bk/job/backup/archive/AbstractArchivist.java index 8c7afac0a3..d9099ae1f4 100644 --- a/src/backend/job-backup/service-job-backup/src/main/java/com/tencent/bk/job/backup/archive/AbstractArchivist.java +++ b/src/backend/job-backup/service-job-backup/src/main/java/com/tencent/bk/job/backup/archive/AbstractArchivist.java @@ -281,8 +281,20 @@ private void backupAndDelete() throws IOException { deleteRows, archiveCost ); - setArchiveSummary(minNeedArchiveId, maxNeedArchiveId, readRows, backupRows, deleteRows, - stop, archiveCost, success, backupReadRecordCost, backupWriteRecordCost, deleteCost); + setArchiveSummary( + minNeedArchiveId, + maxNeedArchiveId, + readRows, + backupRows, + deleteRows, + backupEnabled ? stop : 0, + deleteEnabled ? stop : 0, + archiveCost, + success, + backupReadRecordCost, + backupWriteRecordCost, + deleteCost + ); } } @@ -400,7 +412,8 @@ private void setArchiveSummary(Long minNeedArchiveId, long readRows, long backupRows, long deleteRows, - long stop, + Long lastBackupId, + Long lastDeleteId, long archiveCost, boolean success, long backupReadCost, @@ -411,8 +424,8 @@ private void setArchiveSummary(Long minNeedArchiveId, archiveSummary.setNeedArchiveRecordSize(readRows); archiveSummary.setBackupRecordSize(backupRows); archiveSummary.setDeleteRecordSize(deleteRows); - archiveSummary.setLastBackupId(stop); - archiveSummary.setLastDeletedId(stop); + archiveSummary.setLastBackupId(lastBackupId); + archiveSummary.setLastDeletedId(lastDeleteId); archiveSummary.setArchiveCost(archiveCost); archiveSummary.setSuccess(success); archiveSummary.setBackupReadCost(backupReadCost);