]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
*** empty log message ***
authorsage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 6 Sep 2006 15:51:02 +0000 (15:51 +0000)
committersage <sage@29311d96-e01e-0410-9327-a35deaab8ce9>
Wed, 6 Sep 2006 15:51:02 +0000 (15:51 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@846 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/jobs/rados/map_dist
ceph/osd/OSD.cc

index bf16023488a6133569f803509ee1756e2ca8b174..09e2aa6d541b7490bc4e87280aec2aaea5cf7982 100644 (file)
@@ -4,8 +4,8 @@
 {
        'sleep' => 3,
 
-       'osdbits' => [6,7,8,9,10,11],
-       'pgperbits' => [3,4,5],#[4,6,8],
+       'osdbits' => [6,7,8],#,9],10,11],
+       'pgperbits' => [3],#,4,5],#[4,6,8],
 
        'nummds' => 1,
 
@@ -14,7 +14,7 @@
                                'n' => '3 + $numosd / 32'],
        'numclient' => 0,
 
-       'fake_osdmap_updates' => [3],
+       'fake_osdmap_updates' => [180],
 
        'fs' => 'ebofs',
 
index 0717d69f9db57bd6010da640addc4680cf86b5a4..792c3b41bb4894558b1d1a7458eefe4a728fabd0 100644 (file)
@@ -508,7 +508,8 @@ void OSD::heartbeat()
 
   // hack: fake reorg?
   if (osdmap && g_conf.fake_osdmap_updates) {
-       if ((rand() % (g_conf.num_osd / g_conf.fake_osdmap_updates)) == whoami / g_conf.fake_osdmap_updates) {
+       if (rand() % g_conf.fake_osdmap_updates == 0) {
+         //if ((rand() % (g_conf.num_osd / g_conf.fake_osdmap_updates)) == whoami / g_conf.fake_osdmap_updates) {
          messenger->send_message(new MOSDIn(osdmap->get_epoch()),
                                                          MSG_ADDR_MON(0));
        }
@@ -524,9 +525,10 @@ void OSD::heartbeat()
        */
   }
 
-  // schedule next!
+  // schedule next!  randomly.
   next_heartbeat = new C_Heartbeat(this);
-  g_timer.add_event_after(g_conf.osd_heartbeat_interval, next_heartbeat);
+  float wait = .5 + ((float)(rand() % 10)/10.0) * (float)g_conf.osd_heartbeat_interval;
+  g_timer.add_event_after(wait, next_heartbeat);
 
   osd_lock.Unlock();  
 }