Question about innodb's implementation for flushing dirty pages to data files

dear all:

i have two questions about innodb’s implementation for flushing dirty pages to data files!

1.As we all known ,innodb use a transaction log[redo log] to act as a permenent record for commited transaction,

[B]Once the log is safely on disk, the transactions are permanent, InnoDB uses a background thread

to flush the changes to the data files intelligently.And Once the recored is updated ,mysql will mark the related

data page in buffer pool as dirty.[/B][From High Performance mysql].

So my question is

what does [a background thread] do with the dirty pages ? does the information in

transaction log enough for that thread to update related data files in filesystem!

2.As mysql use MVCC to supply multi-versin data in tablespace[on disk],and once we update the

record,mysql will mark the related data page in bufferpool as dirty page!

so my question is

what’s the relation between the mvcc in filesystem and dirty page in buffer pool!

and when does mysql write the new multi-version data to the filesystem as writing to the filesystem is a

time-consuming job!

The picture is what i understand ,does it right!
Thanks in advance!

I am not sure I understand your question clearly.

If you update a row, the page is marked dirty.
If you commit the transaction, the txn log will contain information needed to re-do the modification.
But the page might not be written yet.
After a checkpoint, the page is guaranteed to be written.
It might be written by the background thread at a convenient time, or it might be written forcibly during the checkpoint.

You can read up on “fuzzy checkpoints” here:

http://dev.mysql.com/doc/mysql-backup-excerpt/5.0/en/innodb- checkpoints.html

Please ignore that page’s advice about how large to make the size of the log. It is wrong.

Thanks a million for your reply firstly ,There are some questions exists however!

As the dirty page will be written to disk by some background thread at some time

and there is some backgroud thread responsible for writing the updated Page to [Double Write Buffer] according [Redo Log],

does that mean one update will bring twice write final data file on disk,

[LIST=1]
[*] updating disk file by [dirty page] in buffer pool updating disk file by [redo log]
[/LIST]
By the way,does the picture i present tell the right thing!