Commit Graph

779 Commits

Author SHA1 Message Date
Brion Vibber e3850e5273 Add progress output and optional --sleep-time parameter to triminboxes.php 2009-12-29 14:16:22 -08:00
Brion Vibber e152bec282 Fix for saving user location preferences -- user_id field was marked as an auto-increment and wasn't getting saved with new inserts. 2009-12-29 11:46:10 -08:00
Evan Prodromou e119362fde Merge branch 'locshunt' into 0.9.x 2009-12-28 15:49:27 -08:00
Evan Prodromou 98a579fedf Merge branch 'master' into 0.9.x 2009-12-28 15:49:14 -08:00
Evan Prodromou ca6669538a Move location-argument-handling code into a single function
Moved the important parts of the location-argument-handling stuff
to a single function. Handles defaults and overrides correctly, and
easy to use. Changed Web and API channels to use it.
2009-12-28 15:13:15 -08:00
Evan Prodromou 39bdda9c7e More configuration options for location sharing 2009-12-28 14:43:34 -08:00
Evan Prodromou 29a1669c01 user_id is primary key for user_location_prefs 2009-12-28 14:43:14 -08:00
Evan Prodromou bb93d6b1c7 remove namespace setting from location; it's unused 2009-12-28 14:21:07 -08:00
Evan Prodromou bbf516b965 turn off exe bits 2009-12-28 13:59:31 -08:00
Evan Prodromou c326824135 add user-location-prefs data objects 2009-12-28 13:59:03 -08:00
Evan Prodromou c07f221040 check if other user exists before unsub 2009-12-28 10:42:31 -08:00
Evan Prodromou 3262930ed4 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-12-23 10:31:27 -08:00
Brion Vibber fa0fbd0118 Fix for massively slow friends timeline query due to indexing bug introduced with repeats.
Sorting on notice.id when our primary selector was notice_inbox.user_id caused a filesort and table scan of the notice table.
Switchng to notice_inbox's notice_id means we can use our index, and everything comes right up.

Before:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice.id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
| id | select_type | table        | type   | possible_keys                      | key     | key_len | ref                           | rows   | Extra                                        |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
|  1 | SIMPLE      | notice_inbox | ref    | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4       | const                         | 102600 | Using index; Using temporary; Using filesort |
|  1 | SIMPLE      | notice       | eq_ref | PRIMARY                            | PRIMARY | 4       | stoica.notice_inbox.notice_id |      1 | Using index                                  |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+

After:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice_id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
| id | select_type | table        | type   | possible_keys                      | key     | key_len | ref                           | rows   | Extra                    |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
|  1 | SIMPLE      | notice_inbox | ref    | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4       | const                         | 102816 | Using where; Using index |
|  1 | SIMPLE      | notice       | eq_ref | PRIMARY,notice_repeatof_idx        | PRIMARY | 4       | stoica.notice_inbox.notice_id |      1 | Using where              |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
2009-12-22 20:30:41 -08:00
Brion Vibber eab6d1c954 Fix for massively slow friends timeline query due to indexing bug introduced with repeats.
Sorting on notice.id when our primary selector was notice_inbox.user_id caused a filesort and table scan of the notice table.
Switchng to notice_inbox's notice_id means we can use our index, and everything comes right up.

Before:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice.id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
| id | select_type | table        | type   | possible_keys                      | key     | key_len | ref                           | rows   | Extra                                        |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+
|  1 | SIMPLE      | notice_inbox | ref    | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4       | const                         | 102600 | Using index; Using temporary; Using filesort |
|  1 | SIMPLE      | notice       | eq_ref | PRIMARY                            | PRIMARY | 4       | stoica.notice_inbox.notice_id |      1 | Using index                                  |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+----------------------------------------------+

After:
mysql> explain SELECT notice.id AS id FROM notice JOIN notice_inbox ON notice.id = notice_inbox.notice_id WHERE notice_inbox.user_id = 18574 AND notice.repeat_of IS NULL ORDER BY notice_id DESC LIMIT 61 OFFSET 0;
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
| id | select_type | table        | type   | possible_keys                      | key     | key_len | ref                           | rows   | Extra                    |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
|  1 | SIMPLE      | notice_inbox | ref    | PRIMARY,notice_inbox_notice_id_idx | PRIMARY | 4       | const                         | 102816 | Using where; Using index |
|  1 | SIMPLE      | notice       | eq_ref | PRIMARY,notice_repeatof_idx        | PRIMARY | 4       | stoica.notice_inbox.notice_id |      1 | Using where              |
+----+-------------+--------------+--------+------------------------------------+---------+---------+-------------------------------+--------+--------------------------+
2009-12-22 20:18:27 -08:00
Evan Prodromou f6bf952980 Merge branch 'testing' 2009-12-22 16:44:19 -08:00
Brion 38877a4922 Skip DB_DataObject's in-process cache for static gets on CLI processes.
The local process cache would grow forever, keeping things stuck in memory and preventing GC.
2009-12-22 16:24:01 -08:00
Evan Prodromou 530673b3cd Merge branch '0.9.x' into testing 2009-12-16 22:14:41 -05:00
Brion Vibber 0ca80f78fb Add doc comments listing the array parameters for User::register() and Notice::saveNew() 2009-12-16 09:27:48 -05:00
Brion Vibber a998bda4a5 Fix UserRightsTest unit tests 2009-12-16 09:27:48 -05:00
Brion Vibber 00fb5feff8 Cleanup undefined variable notice: set a couple more null defaults for new params in Notice::saveNew().
Fixes this notice seen while using AJAX repeat button:
Notice: Undefined variable: uri in classes/Notice.php on line 243
2009-12-16 09:27:48 -05:00
Brion Vibber e2e1843639 slight cleanup for a bit in Notice.php where a var was reused for different types, confusing tracking down a bug 2009-12-16 09:27:47 -05:00
Evan Prodromou 2a1468ec8b Merge branch '0.9.x' into testing 2009-12-15 16:24:52 -05:00
Evan Prodromou 22f02b35ad call DB_DataObject::__destruct() if it exists 2009-12-15 12:38:15 -05:00
Evan Prodromou 945661d942 take out DB_DataObject destructor 2009-12-15 12:33:17 -05:00
Evan Prodromou 797a0d79fb create a method for notification for new messages, and use it 2009-12-15 10:31:25 -05:00
Brion Vibber b9040a7cc4 Add destructor on Memcached_DataObject to free DB_DataObject's global storage for an object when that object itself is destroyed.
Reduces some, but not all, memory leakage for long-running processes.
2009-12-14 16:36:01 -08:00
Evan Prodromou 2a8eee0e0b add friends_timeline with no repeats in it 2009-12-14 16:41:25 -05:00
Evan Prodromou 438a0d7f1c remove obsoleted getStream, getStreamDirect, getCachedStream from Notice; use stream() instead 2009-12-12 16:58:39 -05:00
Evan Prodromou 1ec54d3433 add statuses/retweeted_to_me to API 2009-12-12 16:15:23 -05:00
Evan Prodromou 698b28c95c clear repeat_of flag when a notice is deleted 2009-12-12 16:02:44 -05:00
Evan Prodromou cfe67a9c01 add statuses/retweets_of_me to API 2009-12-12 16:00:27 -05:00
Evan Prodromou 138ce0cd05 add statuses/retweeted_by_me api action 2009-12-12 15:35:05 -05:00
Evan Prodromou c622d14440 add statuses/retweets to API 2009-12-12 14:46:24 -05:00
Brion Vibber 727357695e Debug check to track down live error -- wrong data type sometimes being sent down to Memcached_DataObject::cacheKey() via various fetch functions, need a backtrace to track it down. 2009-12-11 14:19:18 -08:00
Evan Prodromou afc86a86d3 save repeats from the form 2009-12-11 11:51:09 -05:00
Evan Prodromou 60754fc6de Merge branch '0.9.x' into forward 2009-12-11 11:38:08 -05:00
Evan Prodromou 79f81ad76d change Notice::saveNew() to use named arguments for little-used options 2009-12-11 11:29:51 -05:00
Evan Prodromou 81843f2acd show the repeat form in notice lists 2009-12-11 10:49:26 -05:00
Evan Prodromou c9649f9321 reset executable bit on Notice.php and statusnet.ini 2009-12-11 10:23:36 -05:00
Evan Prodromou da30890988 add repeat_of column to notice class 2009-12-11 10:22:56 -05:00
Evan Prodromou e9b733e7f0 Merge branch '0.9.x' into testing 2009-12-11 09:55:47 -05:00
Evan Prodromou 433106dfc5 remove 'has forwarded' method from Profile 2009-12-10 14:40:48 -05:00
Evan Prodromou dd098fee77 remove forward table from db scripts 2009-12-10 14:34:47 -05:00
Evan Prodromou 144faade3b move forwarding stuff to Repeat plugin 2009-12-10 13:31:16 -05:00
Craig Andrews b07e1143cc Override login_token's sequenceKey() so that it behaves correctly 2009-12-10 13:08:24 -05:00
Evan Prodromou fcce5a064a Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x 2009-12-08 21:18:49 -05:00
Evan Prodromou 45408142e9 reorder notices when not using memcached 2009-12-08 21:02:54 -05:00
Brenda Wallace 789378838b that pesky table named user - now quoted 2009-12-09 13:26:59 +13:00
Evan Prodromou 9dff9e6cea make sure not to forward blocked users 2009-12-08 17:42:07 -05:00
Evan Prodromou c49ece9fb4 method to check if a profile has forwarded a notice 2009-12-08 17:20:17 -05:00