October 27th, 2003

nnn
  • boobay

with MEMCACHE ==> get data from master and not from slave (why?)

with MEMCHACHE_SERVERS set LJ gets the (initial) data from the master server(s) and not from a slave, e.g.:
if ($opts->{'cache'} && @LJ::MEMCACHE_SERVERS) {
            $db = $table eq "userproplite2" ?
                LJ::get_cluster_master($u) :
                LJ::get_db_writer();
        }
        unless ($db) {
            $db = $table eq "userproplite2" ?
                LJ::get_cluster_reader($u) :
                LJ::get_db_reader();

...

why is that? for me every hit to the master is much more expensive than using the slave... is there any way to get the memcaches filled by using a (local) slave?

Holy Crap!

I just modified my en.dat file and now whenever I attempt to load the data into my website (I have already done a wipedb) it says:

[justgags@Cerebellum bin]# upgrading/texttool.pl load
Populating structure...
Inserting language: English
Inserting domain: general[]
Inserting language domains ...
done.
Populating text...
en
en:501: Bogus format.
[justgags@Cerebellum bin]#

So, uh, yeah. Quick fix? My site is semi-b0rked right now.

Site-Specific Text

I have attempted once again to no avail to create custom language files for my install. Perhaps someone can help me. I've followed instructions from: http://www.livejournal.com/doc/server/lj.customize.text.new.html and when I do a "load" on texttool I get the following:

"Undefined domain: faq"

So, in my text-local.dat file, I commented out the bottom line regarding FAQ's. The "load" command then completed without delivering an error message. And from the output it seemed to have loaded the custom content from my en_SC.dat file. However, when I go to my site, none of the modification in my en_SC.dat file have taken effect. It's all the LJ defaults from the en.dat file.

Help?

Site-Specific Text (Take Two)

OK, still not working :'(.

Is there something that has to be included at the top of the en_SC.dat file to reference the en.dat file? I wouldnt think so because the output of texttool.pl load is as follows:

[justgags@Cerebellum justgags]$ bin/upgrading/texttool.pl load
Populating structure...
Inserting language: English
Inserting language: English (SC)
Inserting domain: general[]
Inserting language domains ...
done.
Populating text...
en
added: 1404
en_SC
added: 163
done.
Removing dead phrases...
File: deadphrases.dat
Done.
Making usable...
en -- en_SC
done.
[justgags@Cerebellum justgags]$

So, it seems to be working, right? Why isn't it showing up on the site, I do a stop + start on Apache as well.