]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PGLog: trigger full recovery for divergent missing objects
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 21 Aug 2019 02:33:42 +0000 (10:33 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 22 Aug 2019 05:45:31 +0000 (13:45 +0800)
They might have a dirty/invalid log history (and hence an invalid
clean_regions as well), and there is no easy way to deduce the
complete clean_regions portion.

For simplicity (and correctness), disable potential incremental recovery
mode for these objects.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PGLog.h
src/osd/osd_types.h

index 2beb72de5273f64e0b597eacda7d8bb58e63277f..ae4c578b1b38c3faeaddbbdf3bc6318a2cf9deab 100644 (file)
@@ -990,6 +990,7 @@ protected:
        ceph_assert(!missing.is_missing(hoid));
       }
       missing.revise_have(hoid, eversion_t());
+      missing.mark_fully_dirty(hoid);
       if (rollbacker) {
        if (!object_not_in_store) {
          rollbacker->remove(hoid);
index 3e5e71ccdfab5a5ec4e9a04558a593448f899fb6..ac981625bda1bed0cfbfc7d72740ff5ff2deb07e 100644 (file)
@@ -4514,6 +4514,14 @@ public:
     }
   }
 
+  void mark_fully_dirty(const hobject_t& oid) {
+    auto p = missing.find(oid);
+    if (p != missing.end()) {
+      tracker.changed(oid);
+      (p->second).clean_regions.mark_fully_dirty();
+    }
+  }
+
   void add(const hobject_t& oid, eversion_t need, eversion_t have,
           bool is_delete, bool make_dirty = true) {
     //if have== eversion_t() means that the object does not exist, we transfer new_object = true