E.g., connection reset. This will help uncover subtle races.
Signed-off-by: Sage Weil <sage@redhat.com>
lock.Unlock();
if (qitem.is_code()) {
+ if (cct->_conf->ms_inject_internal_delays &&
+ cct->_conf->ms_inject_delay_probability &&
+ (rand() % 10000)/10000.0 < cct->_conf->ms_inject_delay_probability) {
+ utime_t t;
+ t.set_from_double(cct->_conf->ms_inject_internal_delays);
+ ldout(cct, 1) << "DispatchQueue::entry inject delay of " << t
+ << dendl;
+ t.sleep();
+ }
switch (qitem.get_code()) {
case D_BAD_REMOTE_RESET:
msgr->ms_deliver_handle_remote_reset(qitem.get_connection());