]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: filter heartbeat stamps when adding to heartbeat_from set, too
authorSage Weil <sage@newdream.net>
Fri, 8 Aug 2008 22:15:53 +0000 (15:15 -0700)
committerSage Weil <sage@newdream.net>
Fri, 8 Aug 2008 22:15:53 +0000 (15:15 -0700)
src/dstartnew.sh
src/osd/OSD.cc

index c21119054b577088001ba137a6d082435818399a..32c91bd12badb5c81fd03b01fc30b4cba803d1b3 100755 (executable)
@@ -44,7 +44,7 @@ do
    echo "---- host $host osd $osd dev $dev ----"
    ls -al $dev
    ssh cosd$host cd ceph/src \; ./cosd --mkfs_for_osd $osd $dev # --osd_auto_weight 1
-   ssh cosd$host cd ceph/src \; ./cosd $dev -d --debug_ms 1 --debug_osd 20 --debug_filestore 10
+   ssh cosd$host cd ceph/src \; ./cosd $dev -d --debug_ms 1 --debug_osd 20 --debug_filestore 10 --debug_ebofs 30 --osd_heartbeat_grace 300
 #   ssh cosd$host cd ceph/src \; valgrind --leak-check-full --show-reachable-yes ./cosd $dev --debug_ms 1 --debug_osd 20 --debug_filestore 10 1>out/o$osd \&
  done
 done
index 95d1ffb2491f5a3f28935e18a8fba8d06f04d3d6..e670538b251828025ecc2f5d68835c2ebdbd1c7d 100644 (file)
@@ -874,6 +874,9 @@ void OSD::update_heartbeat_peers()
   map<int, utime_t> stamps;
   stamps.swap(heartbeat_from_stamp);
 
+  set<int> old_heartbeat_from;
+  old_heartbeat_from.swap(heartbeat_from);
+
   // build heartbeat to/from set
   heartbeat_to.clear();
   heartbeat_from.clear();
@@ -893,7 +896,7 @@ void OSD::update_heartbeat_peers()
        int p = pg->acting[i]; // peer
        assert(p != whoami);
        heartbeat_from.insert(p);
-       if (stamps.count(p))
+       if (stamps.count(p) && old_heartbeat_from.count(p))  // have a stamp _AND_ i'm not new to the set
          heartbeat_from_stamp[p] = stamps[p];
       }
     }