Skip to content

Commit 630738a

Browse files
committed
fix DBW bugs that don't flush DBW in buf_dblwr_update()
1 parent 1fbd5a5 commit 630738a

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

storage/innobase/buf/buf0dblwr.cc

+4
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,11 @@ buf_dblwr_update(
847847
mutex_exit(&buf_dblwr->mutex);
848848
/* This will finish the batch. Sync data files
849849
to the disk. */
850+
#if defined (UNIV_PMEMOBJ_DBW)
851+
//We do not need this flush
852+
#else //original
850853
fil_flush_file_spaces(FIL_TYPE_TABLESPACE);
854+
#endif
851855
mutex_enter(&buf_dblwr->mutex);
852856
/* We can now reuse the doublewrite memory buffer: */
853857
buf_dblwr->first_free = 0;

storage/innobase/srv/srv0start.cc

+16-2
Original file line numberDiff line numberDiff line change
@@ -2868,11 +2868,25 @@ innobase_shutdown_for_mysql(void)
28682868
#endif
28692869
pm_wrapper_free(gb_pmw);
28702870
#endif
2871+
28712872
#if defined (UNIV_TRACE_FLUSH_TIME)
28722873
printf("=== > TRACE FLUSH TIME: total flush time (ms) = %zu\n ", gb_flush_time);
2873-
fprintf(gb_trace_file, "\n===>TRACE_FLUSH_TIME: total flush time (ms) = %zu", gb_flush_time);
2874+
//Add the method name in the trace out
2875+
#if defined (UNIV_PMEMOBJ_DBW)
2876+
fprintf(gb_trace_file, "\n===>TRACE_FLUSH_TIME_DBW: total flush time (ms) = %zu", gb_flush_time);
2877+
#elif defined (UNIV_PMEMOBJ_BUF) && defined (UNIV_PMEMOBJ_WAL)
2878+
fprintf(gb_trace_file, "\n===>TRACE_FLUSH_TIME_WAL_LESS: total flush time (ms) = %zu", gb_flush_time);
2879+
#elif defined (UNIV_PMEMOBJ_BUF) && defined (UNIV_PMEMOBJ_BUF_PARTITION)
2880+
fprintf(gb_trace_file, "\n===>TRACE_FLUSH_TIME_PARTITION: total flush time (ms) = %zu", gb_flush_time);
2881+
#elif defined (UNIV_PMEMOBJ_BUF)
2882+
fprintf(gb_trace_file, "\n===>TRACE_FLUSH_TIME_EVEN: total flush time (ms) = %zu", gb_flush_time);
2883+
#elif defined (UNIV_PMEMOBJ_WAL)
2884+
fprintf(gb_trace_file, "\n===>TRACE_FLUSH_TIME_WAL: total flush time (ms) = %zu", gb_flush_time);
2885+
#else
2886+
fprintf(gb_trace_file, "\n===>TRACE_FLUSH_TIME_ORI: total flush time (ms) = %zu", gb_flush_time);
2887+
#endif //defined (UNIV_PMEMOBJ_DBW)
28742888
fclose(gb_trace_file);
2875-
#endif
2889+
#endif //defined (UNIV_TRACE_FLUSH_TIME)
28762890

28772891
/* 2. Make all threads created by InnoDB to exit */
28782892
srv_shutdown_all_bg_threads();

0 commit comments

Comments
 (0)