@@ -659,7 +659,8 @@ buf_dblwr_update(
659659 mutex_exit (&buf_dblwr->mutex );
660660 /* This will finish the batch. Sync data files
661661 to the disk. */
662- fil_flush_file_spaces (FIL_TABLESPACE);
662+ if (bpage->isShared == 0 )
663+ fil_flush_file_spaces (FIL_TABLESPACE);
663664 mutex_enter (&buf_dblwr->mutex );
664665
665666 /* We can now reuse the doublewrite memory buffer: */
@@ -1154,12 +1155,15 @@ buf_dblwr_flush_buffered_writes(void)
11541155#if 1
11551156 fil_share_complete_io ( get_space_id (buf_dblwr->buf_block_arr [i]),
11561157 buf_block_get_page_no ((buf_block_t *)buf_dblwr->buf_block_arr [i]));
1157- if (fil_share_is_table (get_space_id (buf_dblwr->buf_block_arr [i])))
1158+ if (fil_share_is_table (get_space_id (buf_dblwr->buf_block_arr [i]))) {
1159+ buf_dblwr->buf_block_arr [i]->isShared = 1 ;
11581160 buf_page_io_complete (buf_dblwr->buf_block_arr [i]);
1161+ buf_dblwr->buf_block_arr [i]->isShared = 0 ;
1162+ }
11591163 // buf_page_share_complete(buf_dblwr->buf_block_arr[i]);
11601164#endif
11611165 }
1162- fsync (share_fd); // / FIXME: is this really needed?
1166+ // fsync(share_fd); /// FIXME: is this really needed?
11631167 } else {
11641168 /* Up to this point first_free and buf_dblwr->first_free are
11651169 same because we have set the buf_dblwr->batch_running flag
@@ -1426,9 +1430,11 @@ buf_dblwr_write_single_page(
14261430 buf_block_get_page_no ((buf_block_t *)bpage));
14271431 fil_share_complete_io (TRX_SYS_SPACE, offset);
14281432
1433+ bpage->isShared = 1 ;
14291434 if (fil_share_is_table (get_space_id (bpage)))
14301435 buf_page_io_complete (bpage);
1431- fsync (share_fd); // / FIXME: is this really needed?
1436+ bpage->isShared = 0 ;
1437+ // fsync(share_fd); /// FIXME: is this really needed?
14321438#endif
14331439 } else {
14341440 /* We know that the write has been flushed to disk now
0 commit comments