summaryrefslogtreecommitdiff
path: root/classes/Memcached_DataObject.php
AgeCommit message (Collapse)Author
2010-01-22Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testingEvan Prodromou
2010-01-22Memcached_DataObject unnecessarily require_once'd itselfEvan Prodromou
2010-01-21Option to log slow db queries or all db queriesBrion Vibber
$config['db']['log_queries'] = true; // all $config['db']['log_slow_queries'] = 10; // queries taking > 10 seconds
2010-01-12Major refactoring of queue handlers to support running multiple sites in one ↵Brion Vibber
daemon. Key changes: * Initialization code moved from common.php to StatusNet class; can now switch configurations during runtime. * As a consequence, configuration files must now be idempotent... Be careful with constant, function or class definitions. * Control structure for daemons/QueueManager/QueueHandler has been refactored; the run loop is now managed by IoMaster run via scripts/queuedaemon.php IoManager subclasses are woken to handle socket input or polling, and may cover multiple sites. * Plugins can implement notice queue handlers more easily by registering a QueueHandler class; no more need to add a daemon. The new QueueDaemon runs from scripts/queuedaemon.php: * This replaces most of the old *handler.php scripts; they've been refactored to the bare handler classes. * Spawns multiple child processes to spread load; defaults to CPU count on Linux and Mac OS X systems, or override with --threads=N * When multithreaded, child processes are automatically respawned on failure. * Threads gracefully shut down and restart when passing a soft memory limit (defaults to 90% of memory_limit), limiting damage from memory leaks. * Support for UDP-based monitoring: http://www.gitorious.org/snqmon Rough control flow diagram: QueueDaemon -> IoMaster -> IoManager QueueManager [listen or poll] -> QueueHandler XmppManager [ping & keepalive] XmppConfirmManager [poll updates] Todo: * Respawning features not currently available running single-threaded. * When running single-site, configuration changes aren't picked up. * New sites or config changes affecting queue subscriptions are not yet handled without a daemon restart. * SNMP monitoring output to integrate with general tools (nagios, ganglia) * Convert XMPP confirmation message sends to use stomp queue instead of polling * Convert xmppdaemon.php to IoManager? * Convert Twitter status, friends import polling daemons to IoManager * Clean up some error reporting and failure modes * May need to adjust queue priorities for best perf in backlog/flood cases Detailed code history available in my daemon-work branch: http://www.gitorious.org/~brion/statusnet/brion-fixes/commits/daemon-work
2010-01-12Avoid spewing warnings about returning by reference on memcached cache ↵Brion Vibber
misses by setting a var and returning it instead of trying to return false directly. This hacky workaround is brought to you by DB_DataObject's PHP 4 roots.
2010-01-11Regression fix: don't spew notices to log every time we get a non-cached ↵Brion Vibber
user object
2010-01-10don't put Users with object IDs in the cache, and don't fetch themEvan Prodromou
2010-01-04Exclude process-specific link & result cache references from serialized ↵Brion Vibber
Memcached_Data_Object instances. Should fix seemingly-random bugs due to destructor free()ing local resources by mistake. cherry-pick from 0.9.x
2010-01-04Revert "Take Memcached_DataObject destructor back out to check whether it ↵Brion Vibber
might be causing some under-the-hood problems." This reverts commit 89cca01259d71f3da961ef64def3647f86a01567.
2010-01-02return false from Memcached_DataObject::staticGet() on not found, like ↵Evan Prodromou
DB_DataObject
2010-01-02change harmless check of to check of in Memcached_DataObjectEvan Prodromou
2010-01-01Merge branch 'master' of git@gitorious.org:statusnet/mainlineEvan Prodromou
2010-01-01Revert "add cleanup method to cleanup a single row"Evan Prodromou
This reverts commit b0527801d9c2b84408bbfdf82bbdc5b778f72cfc.
2010-01-01add cleanup method to cleanup a single rowEvan Prodromou
2010-01-01stop using DB_DataObject's staticGet() which cachesEvan Prodromou
2009-12-30Take Memcached_DataObject destructor back out to check whether it might be ↵Brion Vibber
causing some under-the-hood problems.
2009-12-30Revert debugging codeBrion Vibber
2009-12-30subbug debug info to check on free orderingBrion Vibber
2009-12-22Merge branch 'testing'Evan Prodromou
2009-12-15call DB_DataObject::__destruct() if it existsEvan Prodromou
2009-12-15take out DB_DataObject destructorEvan Prodromou
2009-12-14Add destructor on Memcached_DataObject to free DB_DataObject's global ↵Brion Vibber
storage for an object when that object itself is destroyed. Reduces some, but not all, memory leakage for long-running processes.
2009-12-11Debug check to track down live error -- wrong data type sometimes being sent ↵Brion Vibber
down to Memcached_DataObject::cacheKey() via various fetch functions, need a backtrace to track it down.
2009-11-10Bringing Sphinx search support up to code: broken out to a plugin, now ↵Brion Vibber
supports multiple sites on a single server. Upgrade notes: * Index names have changed from hardcoded 'Identica_people' and 'Identica_notices' to use the database name and actual table names. Must reindex. New events: * GetSearchEngine to override default search engine class selection from plugins New scripts: * gen_config.php generates a sphinx.conf from database configuration (with theoretical support for status_network table, but it doesn't seem to be cleanly queriable right now without knowing the db setup info for that. Needs generalized support.) * Replaced old sphinx-indexer.sh and sphinx-cron.sh with index_update.php Other fixes: * sphinx.conf.sample better matches our live config, skipping unused stopword list and using a more realistic indexer memory limit Further notes: * Probably doesn't work right with PostgreSQL yet; Sphinx can pull from PG but the extraction queries currently look like they use some MySQL-specific functions.
2009-08-26define LACONICA and accept LACONICA for backwards compatibilityEvan Prodromou
2009-08-25change LACONICA to STATUSNETEvan Prodromou
2009-08-25a distributed -> the distributedEvan Prodromou
2009-08-25change Laconica and Control Yourself to StatusNet in PHP filesEvan Prodromou
2009-07-27better check for existing DB connection runs SET NAMES UTF8 lessEvan Prodromou
2009-07-05Revert "Merge branch '0.8.x' into cachenonexistent"Evan Prodromou
This reverts commit e21d2cfdb5f259a07d7af0e3c7f5421315ed2710.
2009-07-05cache failure to find in memcachedEvan Prodromou
2009-06-21Add like for searchEvan Prodromou
2009-06-20Update copyright dates in files modified in 2009Evan Prodromou
2009-06-20change Controlez-Vous to Control YourselfEvan Prodromou
2009-06-18Make sure we have a DB connection before setting its charsetZach Copley
2009-05-30Use mysql_set_charset for connection instead of SET NAMESEvan Prodromou
PHP doesn't get the info about the charset of the connection if you use SET NAMES. So, we use the appropriate PHP function instead.
2009-05-27optionally use SET NAMES for utf8 to DBEvan Prodromou
2009-04-26Revert "Revert "run 'set names' after each connection to deal with UTF8 ↵Evan Prodromou
correctly"" This reverts commit 86770ccde7914219a0a572ced6dd21fa65566e1d.
2009-04-26Revert "run 'set names' after each connection to deal with UTF8 correctly"Evan Prodromou
This reverts commit 84072aa5cf6124d59a06a7f0a7945c00ee2836da. This commit caused grievous harm to old notices on identi.ca. Reverting until we figure out how to convert the old notices.
2009-04-26run 'set names' after each connection to deal with UTF8 correctlyEvan Prodromou
2009-01-22Was accidentally not saving cached items (doh!)Evan Prodromou
2009-01-22Fixed bug in caching of queriesEvan Prodromou
2009-01-22Return $inst, not $cls, if no cache in Memcached_DataObjectEvan Prodromou
2009-01-22Add a method the memcached_object that lets it cache query resultsEvan Prodromou
2008-12-23change function headers to K&R styleEvan Prodromou
Another huge change, for PEAR code standards compliance. Function headers have to be in K&R style (opening brace on its own line), instead of having the opening brace on the same line as the function and parameters. So, a little perl magic found all the function definitions and move the opening brace to the next line (properly indented... usually). darcs-hash:20081223193323-84dde-a28e36ecc66672c783c2842d12fc11043c13ab28.gz
2008-12-23replace NULL with nullEvan Prodromou
Another global search-and-replace update. Here, I've replaced the PHP keyword 'NULL' with its lowercase version. This is another PEAR code standards change. darcs-hash:20081223192129-84dde-4a0182e0ec16a01ad88745ad3e08f7cb501aee0b.gz
2008-12-23replace all tabs with four spacesEvan Prodromou
The PEAR coding standards decree: no tabs, but indent by four spaces. I've done a global search-and-replace on all tabs, replacing them by four spaces. This is a huge change, but it will go a long way to getting us towards phpcs-compliance. And that means better code readability, and that means more participation. darcs-hash:20081223191907-84dde-21e8efe210e6d5d54e935a22d0cee5c7bbfc007d.gz
2008-12-10always return a variable by referenceEvan Prodromou
darcs-hash:20081210233503-84dde-ae7e4acd0d5e42d6d743b545688ad4ad51bc5014.gz
2008-11-23sphinx: fallback if no connectionmillette
darcs-hash:20081123201616-099f7-54ac0134e38e145b99a81336ae0b51a8ecd560a8.gz
2008-11-20sphinx search for noticesmillette
darcs-hash:20081120215041-099f7-db396a60755d551099122b58634b7550d5606d88.gz