OPTION(mon_slurp_timeout, OPT_DOUBLE, 10.0)
OPTION(mon_slurp_bytes, OPT_INT, 256*1024) // limit size of slurp messages
OPTION(mon_client_bytes, OPT_U64, 500ul<<20) // client msg data allowed in memory (in bytes)
+OPTION(mon_max_log_entries_per_event, OPT_INT, 4096)
OPTION(paxos_max_join_drift, OPT_INT, 10) // max paxos iterations before we must first slurp
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
m->put();
}
+bool LogMonitor::should_propose(double& delay)
+{
+ // commit now if we have a lot of pending events
+ if (g_conf->mon_max_log_entries_per_event > 0 &&
+ pending_log.size() >= (unsigned)g_conf->mon_max_log_entries_per_event)
+ return true;
+
+ // otherwise fall back to generic policy
+ return PaxosService::should_propose(delay);
+}
bool LogMonitor::preprocess_command(MMonCommand *m)
bool prepare_log(MLog *m);
void _updated_log(MLog *m);
+ bool should_propose(double& delay);
+
struct C_Log : public Context {
LogMonitor *logmon;
MLog *ack;