- 02 Aug, 2011 1 commit
-
-
Evan Prodromou authored
This method lets you get all the objects with a given variable key and another set of "fixed" keys. A good example is getting all the avatars for a notice list; the avatar size stays the same, but the IDs change. Since it's very similar to multiGet(), I refactored that function to use pivotGet(). And, yes, I realize these are kind of hard to follow.
-
- 14 Jul, 2011 2 commits
-
-
Evan Prodromou authored
-
Evan Prodromou authored
-
- 11 Jul, 2011 1 commit
-
-
Evan Prodromou authored
-
- 11 Apr, 2011 1 commit
-
-
Evan Prodromou authored
-
- 22 Mar, 2011 1 commit
-
-
Evan Prodromou authored
like leprous boils in our code. So, I've replaced all of them with // comments instead. It's a massive, meaningless, and potentially buggy change -- great one for the middle of a release cycle, eh?
-
- 31 Jan, 2011 2 commits
-
-
Brion Vibber authored
Performance counters: records number of total and unique cache get/set/incr/deletes and queries, and logs to syslog. $config['site']['logperf'] = true; // to record & dump total hits of each type and the runtime to syslog $config['site']['logperf_detail'] = true; // very verbose -- dump the individual cache keys and queries as they get used (may contain private info in some queries) Seeing 180 cache gets on a timeline page seems not unusual currently; since these run in serial, even relatively small roundtrip times can add up heavily. We should consider ways to reduce the number of round trips, such as more frequently storing compound objects or the output of processing in memcached. Doing parallel multi-key lookups could also help by collapsing round-trip times, but might not be easy to fit into SN's object model. (For things like streams this should actually work pretty well -- grab the list, then when it's returned go grab all the individual items in parallel and return the list)
-
Brion Vibber authored
Fix for ticket #3020: set MySQL session time_zone variable to UTC ('+0:00') so TIMESTAMP column values are comparable against our other UTC timestamp values. MySQL stores TIMESTAMP columns as UTC, but with a local time interface. (SRSLY?!) DATETIME columns are always bare and assumed to be local time, but we keep only UTC in them. Forcing the session time_zone to UTC means we won't have to worry as much about what we're sending/receiving in there. Also will let us remove the hack in master commit a7abb232 for session tweaks
-
- 27 Dec, 2010 1 commit
-
-
Evan Prodromou authored
-
- 17 Dec, 2010 1 commit
-
-
Brion Vibber authored
-
- 15 Oct, 2010 1 commit
-
-
Brion Vibber authored
Tweak DB query logging to also log queries that fail; the exceptions we get are often not very descriptive like "No such table" without saying which table. :)
-
- 28 Sep, 2010 1 commit
-
-
Siebrand Mazeland authored
* whitespace and indentation updates
-
- 06 Sep, 2010 3 commits
-
-
Evan Prodromou authored
-
Evan Prodromou authored
-
Evan Prodromou authored
-
- 06 Aug, 2010 1 commit
-
-
Brion Vibber authored
OStatus/FeedSub: tweaked PuSH feed garbage collection so other plugins can declare usage of a low-level feed or an OStatus profile besides profile subscriptions & group memberships. SubMirror: redid add-mirror frontend to accept a feed URL, then pass that on to OStatus, instead of pulling from your subscriptions. Profile: tweaked subscriberCount() so it doesn't subtract 1 for foreign profiles who aren't subscribed to themselves; instead excludes the self-subscription in the count query. Memcached_DataObject: tweak to avoid extra error spew in the DB error raising Work in progress: tweaking feedsub garbage collection so we can count other uses
-
- 30 Jul, 2010 1 commit
-
-
Siebrand Mazeland authored
* Tweak message
-
- 29 Jul, 2010 1 commit
-
-
Siebrand Mazeland authored
* add FIXMEs for strings that may need i18n, but leaving decision to other dev(s)
-
- 14 Jul, 2010 1 commit
-
-
Evan Prodromou authored
-
- 04 Jun, 2010 2 commits
-
-
Evan Prodromou authored
-
Evan Prodromou authored
-
- 07 Apr, 2010 1 commit
-
-
Evan Prodromou authored
-
- 29 Mar, 2010 1 commit
-
-
Brion Vibber authored
Add $config['db']['annotate_queries'] option to include caller ID comments into queries. Comment can then be seen in process list, slow query logs on the server, aiding in tracking down unexpected slow queries. SELECT /* queuedaemon.php Ostatus_profile->processPost */ * FROM notice WHERE ( notice.uri = 'http://stormcloud.local/mublog2/notice/479' ) INSERT /* POST Notice::saveNew */ INTO notice (profile_id , content ....
-
- 24 Mar, 2010 1 commit
-
-
Brion Vibber authored
-
- 24 Feb, 2010 1 commit
-
-
Brion Vibber authored
Add class and (if present) id to DB_DataObject error exceptions; often they're VERRRRRY vague, and it helps to know what type of item is failing!
-
- 16 Feb, 2010 1 commit
-
-
Brion Vibber authored
- Multiplexing queues into groups and for multiple sites. - Sharing vs breakout configurable per site and per queue via $config['queue']['breakout'] - Detect how many times a message is redelivered, discard if it's killed too many daemons - count configurable with $config['queue']['max_retries'] - can dump the items to files in $config['queue']['dead_letter_dir'] Queue daemon memory & resource leak fixes: - avoid unnecessary reconnections to memcached server (switch persistent connections back in on second initialization, assuming it's child process) - monkey-patch for leaky .ini loads in DB_DataObject::databaseStructure() - was leaking 200k per active switch - applied leak fixes to Status_network as well, using intermediate base Safe_DataObject for both it and Memcache_DataObject Misc queue fixes: - correct handling of child processes exiting due to signal termination instead of regular exit - shutdown instead of infinite respawn loop if we're already past the soft memory limit at startup - Added --all option for xmppdaemon... still opens one xmpp connection per site that has xmpp active Cache updates: - add Cache::increment() method with native support for memcached atomic increment
-
- 05 Feb, 2010 1 commit
-
-
Brion Vibber authored
Don't spew warnings on usage of MEMCACHE_COMPRESSED constant when memcache PHP extension is not present. Switched to a locally-defined Cache::COMPRESSED, translating that to MEMCACHE_COMPRESSED in the plugin.
-
- 29 Jan, 2010 1 commit
-
-
Evan Prodromou authored
-
- 28 Jan, 2010 3 commits
-
-
Evan Prodromou authored
-
Evan Prodromou authored
-
Brion Vibber authored
Don't preemptively close existing DB connections for web views (needed to keep # of conns from going insane on multi-site queue daemons, so just doing for CLI) May, or may not, help with mystery session problems
-
- 25 Jan, 2010 2 commits
-
-
Evan Prodromou authored
Moved much of the writing that happens when posting a notice to a new queuehandler, distribqueuehandler. This updates tags, groups, replies and inboxes at queue time (or at Web time, if queues are disabled). To make this work well, I had to break up the monolithic Notice::blowCaches() and make cache blowing happen closer to where data is updated. Squashed commit of the following: commit 5257626c62750ac4ac1db0ce2b71410c5711cfa3 Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 14:56:41 2010 -0500 slightly better handling of blowing tag memory cache commit 8a22a3cdf6ec28685da129a0313e7b2a0837c9ef Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 01:42:56 2010 -0500 change 'distribute' to 'distrib' so not too long for dbqueue commit 7a063315b0f7fad27cb6fbd2bdd74e253af83e4f Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 01:39:15 2010 -0500 change handle_notice() to handle() in distributqueuehandler commit 1a39ccd28b9994137d7bfd21bb4f230546938e77 Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 16:05:25 2010 -0500 error with queuemanager commit e6b3bb93f305cfd2de71a6340b8aa6fb890049b7 Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 01:11:34 2010 -0500 Blow memcache at different point rather than one big function for Notice class commit 94d557cdc016187d1d0647ae1794cd94d6fb8ac8 Author: Evan Prodromou <evan@status.net> Date: Mon Jan 25 00:48:44 2010 -0500 Blow memcache at different point rather than one big function for Notice class commit 1c781dd08c88a35dafc5c01230b4872fd6b95182 Author: Evan Prodromou <evan@status.net> Date: Wed Jan 20 08:54:18 2010 -0500 move broadcasting and distributing to new queuehandler commit da3e46d26b84e4f028f34a13fd2ee373e4c1b954 Author: Evan Prodromou <evan@status.net> Date: Wed Jan 20 08:53:12 2010 -0500 Move distribution of notices to new distribute queue handler
-
Evan Prodromou authored
I made a bad merge on Jan 10th from master to 0.9.x. This lost a number of memcache enhancements made on the 0.9.x branch. I've been able to re-do the manual merge, and this represents the changes. Most of them are related to caching on insert.
-
- 22 Jan, 2010 1 commit
-
-
Evan Prodromou authored
-
- 21 Jan, 2010 1 commit
-
-
Brion Vibber authored
$config['db']['log_queries'] = true; // all $config['db']['log_slow_queries'] = 10; // queries taking > 10 seconds
-
- 13 Jan, 2010 1 commit
-
-
Brion Vibber authored
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
-
- 12 Jan, 2010 1 commit
-
-
Brion Vibber authored
Avoid spewing warnings about returning by reference on memcached cache 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.
-
- 11 Jan, 2010 1 commit
-
-
Brion Vibber authored
-
- 10 Jan, 2010 1 commit
-
-
Evan Prodromou authored
-
- 07 Jan, 2010 1 commit
-
-
Evan Prodromou authored
-