Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 2

Displaying posts with tag: slave precache (reset)

Implementing a Replication precacher
+0 Vote Up -0Vote Down

I've completed a beta implementation of my take on the replication pre-cache tool... Sorry nothing to download yet, I have to get it through an internal committee at Yahoo before I can release it (and you can imagine things are kind of crazy here).  I wrote it myself because:

  • I had it mostly done before I found out there were other versions out there
  • I have to maintain it inside of Yahoo anyway
  • I wanted to learn Ruby :)

  • It's just over 250 lines of Ruby, my new favorite language and fairly compact.  It doesn't use the Ruby Mysql library, rather just IO.popen calls to the mysql command line client.  I did this for two reasons: 

  • I haven't figured out the "right" way to deploy ruby gems at Yahoo yet (it's complicated).
  • read more

    Faster way to find the next valid position in a relay log?
    +0 Vote Up -0Vote Down

    I'm working on an implementation of a mysql slave precache tool as described by Paul Tuckfield at last year's User conference.

    I can easily tell where the SQL Thread is currently is reading from in the local relay log, but it's a harder problem to solve when I want to scan ahead in that log some number of binlog entries and find a valid position. I can simply add to the position some number of bytes, but then I have to stop and loop through calls to 'mysqlbinlog' until I get a position that doesn't throw an error.

    This turns out to be a pretty expensive operation, and I'm having a problem where by the time I find a good position and can start my precacher, the slave is already past me!

    Does anyone have any clever ways to find good binary log positions besides this (this is in

      [Read more...]
    Showing entries 1 to 2

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.