OPTION(osd_debug_drop_ping_duration, OPT_INT, 0)
OPTION(osd_debug_drop_pg_create_probability, OPT_DOUBLE, 0)
OPTION(osd_debug_drop_pg_create_duration, OPT_INT, 1)
+OPTION(osd_debug_drop_op_probability, OPT_DOUBLE, 0) // probability of stalling/dropping a client op
OPTION(osd_op_history_size, OPT_U32, 20) // Max number of completed ops to track
OPTION(osd_op_history_duration, OPT_U32, 600) // Oldest completed op to track
OPTION(osd_target_transaction_size, OPT_INT, 300) // to adjust various transactions that batch smaller items
return;
}
+ if (g_conf->osd_debug_drop_op_probability > 0 &&
+ !m->get_source().is_mds()) {
+ if ((double)rand() / (double)RAND_MAX < g_conf->osd_debug_drop_op_probability) {
+ dout(0) << "handle_op DEBUG artificially dropping op " << *m << dendl;
+ return;
+ }
+ }
+
if (m->may_write()) {
// full?
if (osdmap->test_flag(CEPH_OSDMAP_FULL) &&