OPTION(osd_command_max_records, OPT_INT, 256)
OPTION(osd_op_log_threshold, OPT_INT, 5) // how many op log messages to show in one go
OPTION(osd_verify_sparse_read_holes, OPT_BOOL, false) // read fiemap-reported holes and verify they are zeros
+OPTION(osd_debug_drop_ping_probability, OPT_DOUBLE, 0)
+OPTION(osd_debug_drop_ping_duration, OPT_INT, 0)
OPTION(filestore, OPT_BOOL, false)
OPTION(filestore_debug_omap_check, OPT_BOOL, 0) // Expensive debugging check on sync
// Use omap for xattrs for attrs over
case MOSDPing::PING:
{
+ if (g_conf->osd_debug_drop_ping_probability > 0) {
+ if (debug_heartbeat_drops_remaining.count(from)) {
+ if (debug_heartbeat_drops_remaining[from] == 0) {
+ debug_heartbeat_drops_remaining.erase(from);
+ } else {
+ debug_heartbeat_drops_remaining[from]--;
+ dout(5) << "Dropping heartbeat from " << from
+ << ", " << debug_heartbeat_drops_remaining[from]
+ << " remaining to drop" << dendl;
+ break;
+ }
+ } else if (g_conf->osd_debug_drop_ping_probability >
+ ((((double)(rand()%100))/100.0))) {
+ debug_heartbeat_drops_remaining[from] =
+ g_conf->osd_debug_drop_ping_duration;
+ dout(5) << "Dropping heartbeat from " << from
+ << ", " << debug_heartbeat_drops_remaining[from]
+ << " remaining to drop" << dendl;
+ break;
+ }
+ }
Message *r = new MOSDPing(monc->get_fsid(),
locked ? osdmap->get_epoch():0,
MOSDPing::PING_REPLY,
epoch_t epoch; ///< most recent epoch we wanted this peer
};
Mutex heartbeat_lock;
+ map<int, int> debug_heartbeat_drops_remaining;
Cond heartbeat_cond;
bool heartbeat_stop;
bool heartbeat_need_update; ///< true if we need to refresh our heartbeat peers