Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

MySQL binary log - write operation

$
0
0

Consider a scenario, where you have a MySQL master and slave server in replication. As we know, binary log enabled on the master and the slave reads from the binary log of the master. From MySQL documentation I understand that, only the fully committed transaction will be written to binary log, so there is no chance of missing any transaction in replication (if everything works well). So my assumption is that, once the transaction is completed and written to tablespace, it will be written to binary log.

My doubt is whether the write operation of the binary log is concurrent or sequential? It means, for example, before writing to binary log and after written to tablespace, if the server shuts down or crashed, what happen to the transactions which happened in mean time?

Also, I am using mysqlbinlog utility and set with stop-never parameter. I need to know, when stop-never enabled the binary log will be in sync on the destination server (I tested it with flush logs - it creates new log on destination too),

  1. How the copying of binary log works?
  2. Is it first writes to master binary log and copied to destination log?
  3. Is it writing on both the source and destination binary log simultaneously?
  4. What will be impact of MySQL performance and disk IO performance?

If I misunderstood the concept, kindly correct me. Thanks in advance.


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>