Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Big Board Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Slave Server --> Search ONLY Details »»
Slave Server --> Search ONLY
Version: , by psico psico is offline
Developer Last Online: Aug 2013 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-19-2006 Last Update: Never Installs: 0
 
No support by the author.

I want to hack my vb 3.6.1 to send only searches to the Slave server, because when someone makes a complex search, the POST table on the slave get locked and all the queries to the POST table are locked until the search finish... That´s why I need to send ONLY searchs to the SLAVE DB...

Anyone know how to do that?

Tnx a lot in advance and sorry for my bad english!

Psico.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-25-2006, 04:35 PM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by psico
I want to hack my vb 3.6.1 to send only searches to the Slave server, because when someone makes a complex search, the POST table on the slave get locked and all the queries to the POST table are locked until the search finish... That?s why I need to send ONLY searchs to the SLAVE DB...

Anyone know how to do that?

Tnx a lot in advance and sorry for my bad english!

Psico.
Hello psico,

Let me see if I understand you question. You want all your searches be sent to your slave DB and not the primary, is that right? If so, its quite simple, I use the following for my NightClubber website

Code:
on your config.php file, add:
if (THIS_SCRIPT == search)
{

**Slave DB details go here**

}

The problem is, that with this code edit, your primary database will replicate into the slave database. Im not quite sure how to replicate only the necesary tables.
Reply With Quote
  #3  
Old 10-26-2006, 12:12 PM
ALanJay ALanJay is offline
 
Join Date: Jun 2002
Location: London
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You might want to take a look at this thread https://vborg.vbsupport.ru/showthread.php?t=127868 which is about creating a separate search engine.
Reply With Quote
  #4  
Old 10-29-2006, 03:33 PM
TosaInu's Avatar
TosaInu TosaInu is offline
 
Join Date: Jul 2004
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

Some hosts auto prefixes the database made with the username. So say, I have 2 domains (on two different boxes). Then I make a masterdatabase called forum at domain1, but that's called domain1_forum, I can call the slavedatabase on the other domain (different serverbox) forum too. But as it's on domain2, it's automatically called domain2_forum.

What to do in such cases?

(Talking about shared and partially dedicated hosting).
Reply With Quote
  #5  
Old 10-29-2006, 06:05 PM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TosaInu
Hello,

Some hosts auto prefixes the database made with the username. So say, I have 2 domains (on two different boxes). Then I make a masterdatabase called forum at domain1, but that's called domain1_forum, I can call the slavedatabase on the other domain (different serverbox) forum too. But as it's on domain2, it's automatically called domain2_forum.

What to do in such cases?

(Talking about shared and partially dedicated hosting).
AS far as vB is coded, there is no way to do what you ask because both databases need the same table prefix.

BUT, if you own the 2 boxes, you can always log in as root and set up a new database without a prefix. Or, better the case, add a new prefix matching your box1's prefix.

If you really cant make the slave database name mirror the name of the master DB, you should submit a ticket to vBulletin Support Staff, but actually they will tell you the same thing I did. Maybe you should contact a vB coder and ask for this edit.


Cya!
Reply With Quote
  #6  
Old 11-02-2006, 03:31 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In search.php, I modify the search queries to point to the slave database server. You only need to replicate user, forum, post and thread on the slave search database.
Reply With Quote
  #7  
Old 11-02-2006, 04:16 AM
COBRAws's Avatar
COBRAws COBRAws is offline
 
Join Date: Oct 2002
Location: Buenos Aires
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
In search.php, I modify the search queries to point to the slave database server. You only need to replicate user, forum, post and thread on the slave search database.
but when you fill in the slave DB server details into the config.php, doesnt vB automatically replicate the whole DB into the slave? I thought it was like this.

thanks for the tips Erwin
Reply With Quote
  #8  
Old 03-21-2007, 02:50 AM
alexi alexi is offline
 
Join Date: Feb 2002
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin View Post
In search.php, I modify the search queries to point to the slave database server. You only need to replicate user, forum, post and thread on the slave search database.

Erwin, could you go into a little more detail on how you did this? Or better yet make a hack?
Reply With Quote
  #9  
Old 03-29-2007, 03:43 PM
jason|xoxide jason|xoxide is offline
 
Join Date: Jul 2006
Location: Exton, PA
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by COBRAws View Post
but when you fill in the slave DB server details into the config.php, doesnt vB automatically replicate the whole DB into the slave? I thought it was like this.

thanks for the tips Erwin
vBulletin does NOT replicate any of your data for you. If you don't already have a replicating pair setup, you shouldn't fill in the slave server details.

Configuring MySQL Replication:
http://dev.mysql.com/doc/refman/5.0/...ion-howto.html
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07994 seconds
  • Memory Usage 2,285KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete