Gokul Selvaraj
Gokul Selvaraj

Reputation: 11

Difference between log.write_lsn and log.flushed_to_disk_lsn in mysql documentation

In MySQL dev documentation the definition of log.write_lsn and log.flushed_to_disk is similar

log.write_lsn

Up to this lsn we have written all data to log files. It's the beginning of the unwritten log buffer. Older bytes in the buffer are not required and might be overwritten in cyclic manner for lsn values larger by log.buf_size.

Value is updated by: log writer thread.

log.flushed_to_disk_lsn

Up to this lsn, we have written and flushed data to log files.

It obviously holds:

log.flushed_to_disk_lsn <= log.write_lsn

Value is updated by: log flusher thread.

My doubt is in log.write_lsn it is like "Up to this lsn we have written all data to log files" and in the log.flushed_to_disk_lsn it is like "Up to this lsn, we have written and flushed data to log files"

  1. does both the parameters are talking about the writes to redo log files only?
  2. what is the difference between the written and flushed?

I don't know if my thought are correct, but i think data written means writting to the buffer and data flushed means writting to the file. Is there any typo in the statement "Up to this lsn we have written all data to log files", does they write log files instead of log buffer?

Upvotes: 1

Views: 34

Answers (0)

Related Questions