diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 8ca57ebc6af..1283fe1b33f 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -2733,17 +2733,11 @@ srv_purge_coordinator_suspend( rw_lock_x_unlock(&purge_sys->latch); if (ret == OS_SYNC_TIME_EXCEEDED) { - - /* No new records added since wait started then simply - wait for new records. The magic number 5000 is an - approximation for the case where we have cached UNDO - log records which prevent truncate of the UNDO - segments. */ - - if (rseg_history_len == trx_sys->rseg_history_len - && trx_sys->rseg_history_len < 5000) { - + if (trx_sys->rseg_history_len == 0) { stop = true; + } else { + os_event_wait_time_low( + slot->event, 100 * SRV_PURGE_MAX_TIMEOUT, sig_count); } }