From 6d91abbce93bf53704c179a3793b5da3d09abd3c Mon Sep 17 00:00:00 2001 From: cailiuyang Date: Thu, 12 Apr 2018 11:43:25 +0800 Subject: [PATCH] meta_backup_service: modify backup_info's status when deleting it --- src/dist/replication/meta_server/meta_backup_service.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dist/replication/meta_server/meta_backup_service.cpp b/src/dist/replication/meta_server/meta_backup_service.cpp index e905f9c1b1..17bd486c21 100644 --- a/src/dist/replication/meta_server/meta_backup_service.cpp +++ b/src/dist/replication/meta_server/meta_backup_service.cpp @@ -921,7 +921,8 @@ void policy_context::gc_backup_info_unlocked(const backup_info &info_to_gc) void policy_context::issue_gc_backup_info_task_unlocked() { if (_backup_history.size() > _policy.backup_history_count_to_keep) { - const backup_info &info = _backup_history.begin()->second; + backup_info &info = _backup_history.begin()->second; + info.info_status = backup_info_status::type::DELETING; ddebug("%s: start to gc backup info with id(%" PRId64 ")", _policy.policy_name.c_str(), info.backup_id);