mirror of
https://github.com/ceph/ceph
synced 2025-01-11 05:29:51 +00:00
osd/osd_types: always call mark_fully_dirty for missing.add
In general we shall build missing set (and hence clean_regions) based on pg log. However, currently there are still 5 cases we might call missing.add to add a new pg_missing_item into the missing set explicitly (or replace an existing pg_missing_item entirely): 1. we explicitly build missing set on startup, in which case we know we are trying to be compatiable with pre-kraken versions, so it should be ok for us to disable inc-recovery. 2. we are currently processing authoritative log, and there are some divergent objects detected. For simplicity (and correctness), we should disable inc-recovery entirly for these objects. 3. we are re-building missing set, e.g., due to the global CEPH_OSDMAP_RECOVERY_DELETES policy changing. In this case we know we are at the end of upgrading from a pervious version that is lack of CEPH_OSDMAP_RECOVERY_DELETES support. Hence it should be the recommended option to disable inc-recovery simultaneously since these objects should be lack of inc-recovery support too. 4. we are adding or re-adding missing object into primary's missing_loc. It doesn't matter whether we have a correct clean_regions there since we never actually refer to that field from missing_loc when we actually start to perform object recovery later. 5. we are auto-repairing a corrupted object and hence the need of adding it to the corresponding missing set first, e.g, by leveraging the existing recovery procedure. In this case, we always disable inc-recovery to make sure this object can be fully (and correctly) recovered later. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
parent
dce9704c28
commit
679f0777a7
@ -4527,9 +4527,9 @@ public:
|
||||
}
|
||||
|
||||
void add(const hobject_t& oid, eversion_t need, eversion_t have,
|
||||
bool is_delete, bool make_dirty = true) {
|
||||
bool is_delete) {
|
||||
//if have== eversion_t() means that the object does not exist, we transfer new_object = true
|
||||
missing[oid] = item(need, have, is_delete, make_dirty, have == eversion_t());
|
||||
missing[oid] = item(need, have, is_delete, true, have == eversion_t());
|
||||
rmissing[need.version] = oid;
|
||||
tracker.changed(oid);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user