]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: archive hit_set if it is old and not full
authorSage Weil <sage@inktank.com>
Wed, 4 Dec 2013 23:17:57 +0000 (15:17 -0800)
committerSage Weil <sage@inktank.com>
Fri, 6 Dec 2013 22:37:29 +0000 (14:37 -0800)
This matches the condition under which we call _persist().

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc

index 11aa2e1872c90486dfe47b1448e4ce56bda36a40..7f5a12faa175eb6c1fc94b6179c540644f6bb444 100644 (file)
@@ -8583,7 +8583,8 @@ void ReplicatedPG::hit_set_persist()
 
   if (!info.hit_set.current_info.begin)
     info.hit_set.current_info.begin = hit_set_start_stamp;
-  if (hit_set->is_full()) {
+  if (hit_set->is_full() ||
+      hit_set_start_stamp + pool.info.hit_set_period <= now) {
     // archive
     hit_set->seal();
     ::encode(*hit_set, bl);