mirror of
https://github.com/ceph/ceph
synced 2024-12-27 14:03:25 +00:00
Merge pull request #234 from ceph/wip-4758
Fixes #4758. Reviewed-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
commit
2501980350
@ -186,6 +186,7 @@ OPTION(mon_leveldb_block_size, OPT_U64, 4*1024*1024) // monitor's leveldb block
|
||||
OPTION(mon_leveldb_bloom_size, OPT_INT, 0) // monitor's leveldb bloom bits per entry
|
||||
OPTION(mon_leveldb_max_open_files, OPT_INT, 0) // monitor's leveldb max open files
|
||||
OPTION(mon_leveldb_compression, OPT_BOOL, false) // monitor's leveldb uses compression
|
||||
OPTION(paxos_stash_full_interval, OPT_INT, 25) // how often (in commits) to stash a full copy of the PaxosService state
|
||||
OPTION(paxos_max_join_drift, OPT_INT, 10) // max paxos iterations before we must first sync the monitor stores
|
||||
OPTION(paxos_propose_interval, OPT_DOUBLE, 1.0) // gather updates for this long before proposing a map update
|
||||
OPTION(paxos_min_wait, OPT_DOUBLE, 0.05) // min time to gather updates for after period of inactivity
|
||||
|
@ -49,6 +49,11 @@ private:
|
||||
|
||||
bool should_propose(double& delay);
|
||||
|
||||
bool should_stash_full() {
|
||||
// commit a LogSummary on every commit
|
||||
return true;
|
||||
}
|
||||
|
||||
struct C_Log : public Context {
|
||||
LogMonitor *logmon;
|
||||
MLog *ack;
|
||||
|
@ -178,7 +178,9 @@ bool PaxosService::should_stash_full()
|
||||
* nonetheless because, in that event,
|
||||
* latest_full == get_trim_to() == 0.
|
||||
*/
|
||||
return (!latest_full || (latest_full <= get_trim_to()));
|
||||
return (!latest_full ||
|
||||
(latest_full <= get_trim_to()) ||
|
||||
(get_version() - latest_full > (unsigned)g_conf->paxos_stash_full_interval));
|
||||
}
|
||||
|
||||
void PaxosService::restart()
|
||||
|
@ -663,7 +663,7 @@ public:
|
||||
* @defgroup PaxosService_h_Stash_Full
|
||||
* @{
|
||||
*/
|
||||
bool should_stash_full();
|
||||
virtual bool should_stash_full();
|
||||
/**
|
||||
* Encode a full version on @p t
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user