|
|
|
@ -2694,7 +2694,6 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)( |
|
|
|
ulint n_flushed = 0; |
|
|
|
ulint last_activity = srv_get_activity_count(); |
|
|
|
ulint lru_sleep_time = srv_cleaner_max_lru_time; |
|
|
|
ulint n_lru=0, n_pgc_flush=0, n_pgc_batch=0; |
|
|
|
|
|
|
|
ut_ad(!srv_read_only_mode); |
|
|
|
|
|
|
|
@ -2739,25 +2738,15 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)( |
|
|
|
next_loop_time = ut_time_ms() + page_cleaner_sleep_time; |
|
|
|
|
|
|
|
/* Flush pages from end of LRU if required */ |
|
|
|
n_lru = n_flushed = buf_flush_LRU_tail(); |
|
|
|
#ifdef UNIV_MTFLUSH_DEBUG
|
|
|
|
if (n_lru) { |
|
|
|
fprintf(stderr,"n_lru:%lu ",n_lru); |
|
|
|
} |
|
|
|
#endif
|
|
|
|
n_flushed = buf_flush_LRU_tail(); |
|
|
|
|
|
|
|
if (srv_check_activity(last_activity)) { |
|
|
|
last_activity = srv_get_activity_count(); |
|
|
|
|
|
|
|
/* Flush pages from flush_list if required */ |
|
|
|
n_flushed += n_pgc_flush = page_cleaner_flush_pages_if_needed(); |
|
|
|
#ifdef UNIV_MTFLUSH_DEBUG
|
|
|
|
if (n_pgc_flush) { |
|
|
|
fprintf(stderr,"n_pgc_flush:%lu ",n_pgc_flush); |
|
|
|
} |
|
|
|
#endif
|
|
|
|
n_flushed += page_cleaner_flush_pages_if_needed(); |
|
|
|
} else { |
|
|
|
n_pgc_batch = n_flushed = page_cleaner_do_flush_batch( |
|
|
|
n_flushed = page_cleaner_do_flush_batch( |
|
|
|
PCT_IO(100), |
|
|
|
LSN_MAX); |
|
|
|
|
|
|
|
@ -2768,20 +2757,7 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)( |
|
|
|
MONITOR_FLUSH_BACKGROUND_PAGES, |
|
|
|
n_flushed); |
|
|
|
} |
|
|
|
#ifdef UNIV_MTFLUSH_DEBUG
|
|
|
|
if (n_pgc_batch) { |
|
|
|
fprintf(stderr,"n_pgc_batch:%lu ",n_pgc_batch); |
|
|
|
} |
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
#ifdef UNIV_MTFLUSH_DEBUG
|
|
|
|
if (n_lru || n_pgc_flush || n_pgc_batch) { |
|
|
|
fprintf1(stderr,"\n"); |
|
|
|
n_lru = n_pgc_flush = n_pgc_batch = 0; |
|
|
|
} |
|
|
|
#endif
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ut_ad(srv_shutdown_state > 0); |
|
|
|
|