← Back to team overview

enterprise-support team mailing list archive

[Bug 1514927] [NEW] Flush logs and lock tables order

 

Public bug reported:

Hi,

In

http://bazaar.launchpad.net/~lenzgr/mylvmbackup/trunk/view/head:/mylvmbackup.pl.in

flushing binary log is done in "preflush" before locking tables
"flush_tables":

  run_hook ("preflush");
  flush_tables($dbh) unless ($skip_flush_tables == 1);
  
  create_posfile($dbh);
  
  run_hook ("presnapshot");
  $snapshot_created= create_lvm_snapshot();

Why not to flush logs ("preflush") after tables are locked
("flush_tables") and have posfile to point to the beginning of next
binlog file? We can see this (correct?) order on

http://dba.stackexchange.com/questions/116816/flush-tables-with-read-lock-not-working
http://www.daork.net/archives/4

Now it is possible to have some changes recorded in new binlog file
between preflush and flush_tables which probably is less
elegant/problematic?

One more thing; in

http://bazaar.launchpad.net/~lenzgr/mylvmbackup/trunk/view/head:/man/mylvmbackup.pod

there is

"
If you use InnoDB tables exclusively, you may also want to consider to include
the option I<--skip_flush_tables>, to avoid the probably time-consuming and in
this case unnecessary flushing of buffers.
"

but using this option does not stop database InnoDB write activity
probably and binlog may change between pos file creation and lvm snap
which may be a problem?

Please verify and fix.

Regards,
Pawel

IB Development Team
https://dev.ib.pl/

** Affects: mylvmbackup
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1514927

Title:
  Flush logs and lock tables order

To manage notifications about this bug go to:
https://bugs.launchpad.net/mylvmbackup/+bug/1514927/+subscriptions