~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/mon/PaxosService.cc

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum, Clint Byrum, Micah Gersten
  • Date: 2011-02-12 22:50:26 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110212225026-yyyw4tk0msgql3ul
Tags: 0.24.2-0ubuntu1
[ Clint Byrum <clint@ubuntu.com> ]
* New upstream release. (LP: #658670, LP: #684011)
* debian/patches/fix-mkcephfs.patch: dropped (applied upstream)
* Removed .la files from libceph1-dev, libcrush1-dev and 
  librados1-dev (per Debian policy v3.9.1 10.2).
* debian/control: adding pkg-config as a build dependency
* debian/control: depend on libcrypto++-dev instead of libssl-dev
* debian/watch: added watch file

[ Micah Gersten <micahg@ubuntu.com> ]
* debian/control: add Homepage

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#define dout_prefix _prefix(mon, paxos, paxos->machine_id)
26
26
static ostream& _prefix(Monitor *mon, Paxos *paxos, int machine_id) {
27
27
  return *_dout << dbeginl
28
 
                << "mon" << mon->whoami
 
28
                << "mon." << mon->name << "@" << mon->rank
29
29
                << (mon->is_starting() ? (const char*)"(starting)":(mon->is_leader() ? (const char*)"(leader)":(mon->is_peon() ? (const char*)"(peon)":(const char*)"(?\?)")))
30
30
                << ".paxosservice(" << get_paxos_name(machine_id) << ") ";
31
31
}
94
94
  // simple default policy: quick startup, then some damping.
95
95
  if (paxos->last_committed <= 1)
96
96
    delay = 0.0;
97
 
  else
98
 
    delay = g_conf.paxos_propose_interval;
 
97
  else {
 
98
    utime_t now = g_clock.now();
 
99
    if ((now - paxos->last_commit_time) > g_conf.paxos_propose_interval)
 
100
      delay = (double)g_conf.paxos_min_wait;
 
101
    else
 
102
      delay = (double)(g_conf.paxos_propose_interval + paxos->last_commit_time
 
103
                       - now);
 
104
  }
99
105
  return true;
100
106
}
101
107