Announcement

Collapse
No announcement yet.

Master / Slave Database Improvements?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dontom
    replied
    thanks for the clarification - will upgrade to 3.6 then
    Thomas

    Leave a comment:


  • Scott MacVicar
    replied
    Searches are sent against the slave database in 3.6, you dont need to make any changes in config.php etc.

    You do however need to change dbtype in config.php to either mysql_slave or mysqli_slave

    Leave a comment:


  • Dontom
    replied
    Originally posted by Zachery View Post
    My bad, I was writing it quickly
    ok, we tried it - the suggested approach has one disadvantage / causes one problem:
    the searchid is inserted into the slave, so the databases are out of sync. When you execute only one search on the master-db you will get a duplicate key error and the slave stops replicating itself.

    I will try to hack search.php, so it runs against the master and only the fulltext-search itself is executed on the slave.

    Thomas

    Leave a comment:


  • Zachery
    replied
    My bad, I was writing it quickly

    Leave a comment:


  • Dontom
    replied
    Under the slave config wrap it in

    if (THIS_SCRIPT == search.php)
    {



    }
    it must be search, not search.php.

    Leave a comment:


  • Zachery
    replied
    Under the slave config wrap it in

    if (THIS_SCRIPT == search.php)
    {



    }
    Last edited by Steve Machol; Mon 4th Sep '06, 11:44pm. Reason: added the P to script. :)

    Leave a comment:


  • Dontom
    replied
    Originally posted by eoc_Jason View Post
    Does searching use the slave db? If not is there an easy way to have it do so?
    same question here - we want to send all earches to the slave, what is the easiest way to do this?
    thanks

    Leave a comment:


  • wildweasel
    replied
    Originally posted by eoc_Jason View Post
    Does searching use the slave db? If not is there an easy way to have it do so?

    up

    WW

    Leave a comment:


  • eoc_Jason
    replied
    Does searching use the slave db? If not is there an easy way to have it do so?

    Leave a comment:


  • Scott MacVicar
    replied
    Only certain queries that wont cause inconsistentices are sent to the slave. This means that most of the post and thread stuff are on the master apart from those where a long wait or slightly incorrect data doesn't matter.

    At the moment reads for posts on showthread always go to the master, I've yet to devise a nice way to look at the lag time between the master and slave and use the appropriate table.

    Leave a comment:


  • eoc_Jason
    replied
    Thanks Steve, I would really appreciate it.

    Leave a comment:


  • Steve Machol
    replied
    I don't know but I'll see if I can get someone to answer.

    Leave a comment:


  • eoc_Jason
    replied
    Not going to get an answer to this am I?

    Leave a comment:


  • eoc_Jason
    started a topic Master / Slave Database Improvements?

    Master / Slave Database Improvements?

    Can someone tell me what the improvements are for vB 3.6.0 in relation to the listed "Improved master / slave database support"?

    My main question is this... Is there logic in the code so that when a person makes a new post / thread, do they stay sticky to the master server so their reply will show up if the page has to be refreshed or does it just blindly go to the slave server for all read requests?

    The issue I have is that searching can take a couple minutes (4.3 million posts) and if the slave server has a read lock on the post table obviously new posts won't be updated on it right away. So when a person creates a new thread if the slave db hasn't updated, wouldn't that cause an error?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X