Re: [Maria-discuss] fsync necessary for synchronous page flush?

2015-05-11 Thread Xiaofei Du
heir > purpose is different, by the time of crash recovery the undo logs > might be purged. > > 2015-05-10 2:57 GMT+03:00 Xiaofei Du : > > Laurynas, > > > > We cannot recover from a torn page only using redo log. But wouldn't undo > > log record enough info

Re: [Maria-discuss] fsync necessary for synchronous page flush?

2015-05-09 Thread Xiaofei Du
fe? Thanks. Xiaofei On Sat, May 9, 2015 at 4:57 PM, Xiaofei Du wrote: > Laurynas, > > We cannot recover from a torn page only using redo log. But wouldn't undo > log record enough information for recovery in the case of a torn page? Undo > log should have old values of aff

Re: [Maria-discuss] fsync necessary for synchronous page flush?

2015-05-09 Thread Xiaofei Du
ect, but to recover the page as well. And > without the doublewrite, if we discard the page, we have nothing: a > half-old half-new page on the disk and the redo log records for that > page are not enough to recover it. > > 2015-05-09 8:44 GMT+03:00 Xiaofei Du : > > Justin, >

Re: [Maria-discuss] fsync necessary for synchronous page flush?

2015-05-08 Thread Xiaofei Du
is required when a page is written to > disk. During recovery all changes since the last checkpoint are replayed, > then transactions that do not have a commit marker are rolled back. This > is called roll forward/roll back recovery. > > --Justin > > On Fri, May 8, 201

Re: [Maria-discuss] fsync necessary for synchronous page flush?

2015-05-08 Thread Xiaofei Du
t; mechanism for torn pages comes from an LSN, which is written into the top > and the bottom of the page. If the LSN at the top and bottom do not match > the page is torn. > > Regards, > > --Justin > > On Fri, May 8, 2015 at 12:43 PM, Xiaofei Du > wrote: > >>

Re: [Maria-discuss] fsync necessary for synchronous page flush?

2015-05-08 Thread Xiaofei Du
m buf_dblwr_flush_buffered_writes > called from buf_flush_common called at the end of either LRU or flush > list flush. If doublewrite is enabled, fsync will happen in > buf_dblwr_update called from buf_flush_write_complete. > > > > > 2015-05-07 9:01 GMT+03:00 Xiaofei Du

Re: [Maria-discuss] fsync necessary for synchronous page flush?

2015-05-07 Thread Xiaofei Du
overy. Thanks. Xiaofei On Wed, May 6, 2015 at 11:01 PM, Xiaofei Du wrote: > Hi Laurynas, > > On Wed, May 6, 2015 at 9:14 PM, Laurynas Biveinis < > laurynas.bivei...@gmail.com> wrote: > >> Xiaofei - >> >> > Does InnoDB maintain a dirty >> > pa

Re: [Maria-discuss] fsync necessary for synchronous page flush?

2015-05-06 Thread Xiaofei Du
Hi Laurynas, On Wed, May 6, 2015 at 9:14 PM, Laurynas Biveinis < laurynas.bivei...@gmail.com> wrote: > Xiaofei - > > > Does InnoDB maintain a dirty > > page table? > > You must be referring to the buffer pool flush_list. > You are right. The flush_list is can be used for recovery and checkpoint.

Re: [Maria-discuss] fsync necessary for synchronous page flush?

2015-05-06 Thread Xiaofei Du
, Jan Lindström wrote: > Hi, > > There is sync for AIO pages also. There is no dirty page table but > naturally dirty pages are marked and they are on LRU list see > buf/buf0lru.cc. > > R: Jan > > On Thu, May 7, 2015 at 12:23 AM, Xiaofei Du > wrote: > >&g

Re: [Maria-discuss] fsync necessary for synchronous page flush?

2015-05-06 Thread Xiaofei Du
confusing here. Page flushing means that we have > done synchronous write to disk but that does not mean that write is > physically on device yet, therefore there is flush to force it to > persistent storage. > > R: Jan > > On Wed, May 6, 2015 at 12:57 AM, Xiaofei Du > wrot

[Maria-discuss] fsync necessary for synchronous page flush?

2015-05-05 Thread Xiaofei Du
Hello, When a dirty page is flushed synchronously in buf_flush_write_block_low, fsync is called in the following snippet. I am wondering why we need this fsync for synchronous flush? The record should be in the log already, so recovery should be able to successfully redo it and apply to the disk d