Commit Graph

7040 Commits

Author SHA1 Message Date
Florence Yeun
afa445caa6 Remove new_info_bar feature flag 2016-01-07 14:45:47 -08:00
Florence Yeun
4bc77a785b Remove thread_locking feature flag 2016-01-07 14:45:44 -08:00
Florence Yeun
572c714c01 Remove tumblr_sharing feature flag 2016-01-07 14:45:28 -08:00
Florence Yeun
a4f34d8733 Fix html typo
Close the `<iframe>` with `</iframe>`.
2016-01-07 14:43:43 -08:00
Florence Yeun
e4e7b98620 Remove /framebuster and FrameBuster 2016-01-07 14:43:39 -08:00
Florence Yeun
e4ed84a05f Remove /frame and Cnameframe 2016-01-07 14:43:24 -08:00
Brian Simpson
22081dd96a Move rendercache behind mcrouter. 2016-01-07 13:01:27 -08:00
Brian Simpson
3b2cbe6bc0 rendercache: Prefix keys with "rend:" instead of "render_". 2016-01-07 13:01:27 -08:00
Brian Simpson
55e419bc64 rendercache: ignore errors on set. 2016-01-07 13:01:23 -08:00
Brian Simpson
dd57b4747e app_globals: Setup g.mcrouter. 2016-01-07 13:01:11 -08:00
Chad Birch
821de2fb98 Allow admins to view wiki banned/contributor lists 2016-01-06 16:58:13 -07:00
MelissaCole
7bea9fd4e6 Add buffer of 1 hour when calculating timeout expiration
TryLater runs periodically (around every 5 minutes), so if the user's suspension
expires within that time and they log in (datetime.now > timeout date),
days_remaining_in_timeout will be 0 and account.in_timeout = True, which is the
same as a permanent suspension. So the modal showed the user as being in a permanent
suspension until TryLater was run next.

Adding a buffer of an hour will show that the suspension still has a day remaining
rather than it being a permanent suspension if the TryLater queue isn't backed up more
than an hour.
2016-01-06 15:31:21 -08:00
MelissaCole
d02a043a01 Skip notifying on username mentions for suspended authors 2016-01-06 14:46:01 -08:00
Brian Simpson
cd431984f0 CommentTreeStorageV1: stop storing empty cids and depth
We're now only storing the tree.
2016-01-06 14:13:07 -08:00
Brian Simpson
a4bbc7de5c CommentTreeStorageBase.add_comments: remove weird parents updating
Looks to be a remnant of when the parent dict was more likely to be
unreliable and when we were storing num_children in the CommentTree.
2016-01-06 14:13:07 -08:00
Brian Simpson
d7486ad393 CommentTreeStorageV1: Stop storing cids, depth and parents
They will always be calculated on the fly from tree. This will let us
store less data in permacache so reading and writing should be faster.
The tree takes roughly 25% as much space as the tree plus cids, depth,
and parents.
2016-01-06 14:13:07 -08:00
Brian Simpson
878bbdddd0 CommentTreeStorageV1: Calculate cids, depth, parents on the fly
We will calculate cids, depth, and parents from the tree, but continue
to update and write these values. This will allow us to gather timings
on the calculation step and be able to revert safely if needed.
2016-01-06 14:13:07 -08:00
Brian Simpson
9d5ce35cdb Move timing into CommentTreeStorageVx.by_link 2016-01-06 14:13:07 -08:00
Brian Simpson
2190987c8b Add method to calculate cids, depth, parents from tree
Testing on an example tree with 16,000 comments takes ~7ms to
calculate the cids, depth, and parents.

This will allow us to stop storing cids, depth, and parents and
instead only store tree and calculate the rest.
2016-01-06 14:13:03 -08:00
Chad Birch
7b1b6ee09a Event collector: take events that 413 out of queue
If a set of events is causing an HTTP 413 response from the actual event
collector, this takes them out of the queue to prevent it from
continuing to crash repeatedly on them, and adds them into a separate
one that we can monitor/process on its own.
2016-01-06 14:41:49 -07:00
Chad Birch
8870b2587e Event publisher: fixes to limiting event size
There were a couple of errors with the way the maximum event size was being
limited that this fixes:

* Only the maximum batch size was being accounted for, not the maximum
  size of an individual event (which is 20% of the batch limit).
* When truncation was done, we were adding an is_truncated field to the
  event, but the truncation didn't account for the size of this new
  field.

This commit fixes these issues and moves the truncation-handling into a
new wrapper class called PublishableEvent, instead of doing it inside
the queue-processor itself. It also takes advantage of the
application_headers support on amqp messages to send info about which
field is truncatable separate from the actual event data. This lets us
avoid needing to deserialize the JSON unless truncation is actually
necessary (and supported).

Graphite events are also added so that we can more easily track how
often oversize events need to be truncated or dropped.
2016-01-06 14:38:01 -07:00
powerlanguage
6a87e13e7c Add messaging to prefs/apps about API registration. 2016-01-06 11:37:21 -08:00
Ricky Ramirez
dcf0db2a4f commentstree_q: Add a min size for fastlane. 2016-01-06 11:06:39 -08:00
Florence Yeun
4ef212de9f Retire multireddits for subreddits
Discontinue support for subreddit owned multis. This feature was
originally added for internal use and is no longer needed.
2016-01-06 10:39:50 -08:00
Brian Simpson
bc74b3205a Install and configure mcrouter. 2016-01-06 10:18:58 -08:00
Brian Simpson
55343c4e91 Remove WikiRevisionsByPage 2016-01-06 10:12:22 -08:00
Brian Simpson
a18418785e Read from WikiRevisionHistoryByPage 2016-01-06 10:12:18 -08:00
Brian Simpson
3eef56f271 Add function for migrating to WikiRevisionHistoryByPage 2016-01-06 10:12:10 -08:00
Brian Simpson
a3986e5edc Add simple index WikiRevisionHistoryByPage.
This will eventually replace WikiRevisionsByPage, which stores
the full contents of each revision in the column value and is
hurting cassandra.
2016-01-06 10:12:05 -08:00
Ricky Ramirez
06fd623ce7 commentstree_q: Batch more comments in fastlane.
Hypothesis: Threads with a high rate of new comments cause Cassandra
performance issues by constantly mutating their permacache entry and increasing
the amount compactions required. The majority of the problem is the velocity of
the updates, not the size of the updates.
2016-01-05 15:52:30 -08:00
Brian Simpson
2f38211bc1 CommentTreeStorageBase.add_comments: Raise exception on bad tree 2016-01-05 14:27:37 -08:00
Brian Simpson
3f91bd782d CommentTreeStorageBase.add_comments: Sort comments before processing 2016-01-05 14:27:37 -08:00
Brian Simpson
d9db916c7f CommentTree: Don't mutate tree when a comment is deleted
It's not necessary because deleted comments are handled in the builder.
Deleting the comment from the depth dict can make the comment tree
inconsistent when attempting to add a child comment.
2016-01-05 14:27:32 -08:00
zeantsoi
02c4391b6a Add PROMOTE_COST_BASIS for reddit-plugin-adzerk 2016-01-05 11:45:46 -08:00
Florence Yeun
6fc38e8c3e Remove deprecated nocname from pages 2016-01-05 11:25:22 -08:00
Florence Yeun
28107e1265 Remove deprecated nocname from plain_link() calls
Also remove from post_link() and text_with_links() calls.

Maintained as an argument for backwards compatibility.
2016-01-05 11:24:30 -08:00
Florence Yeun
0e181e293e Remove deprecated nocname from add_sr() calls
Maintained as an argument for backwards compatibility.
2016-01-05 11:23:14 -08:00
Florence Yeun
3fbcc5b0b1 Remove deprecated cname from get_domain() calls
Maintained as an argument for backwards compatibility.
2016-01-05 11:23:14 -08:00
Neil Williams
ccf19e5f73 vote: Remove ByDay CFs
These are hurting compaction and only used in the about stats.
2016-01-04 16:18:11 -08:00
Florence Yeun
3dd7b46e99 Events: Add screenview listing target and listing name
Set screenview `target_type` to `listing` for subreddit listings and
set `listing_name`.
2016-01-04 13:33:26 -08:00
Florence Yeun
f8736d9499 Events: Add feature flag for screenview event 2016-01-04 13:33:17 -08:00
Florence Yeun
b880dfad31 Events: Add screenview event
New client-side screenview event. Event data is added explicitly to
`r.config.event_target` via `extra_js_config` and via `render_params`
for listings. There is no url parsing from javascript.
2016-01-04 13:33:16 -08:00
Florence Yeun
cf37eeb609 Events: Add additional context data
Add `doNotTrack`, `language`, `referrer`, and `referrerDomain` to
`r.analytics.contextData`.
2016-01-04 13:28:38 -08:00
Florence Yeun
997b8ed270 Events: Move event handling into r.analytics
Move event handling for timeouts from `r.analytics.event` into
`r.analytics`.
2016-01-04 13:28:29 -08:00
Kevin O'Connor
400a38ef5d cloudsearch: Use extend instead of append as we're passing a list 2016-01-04 13:10:00 -08:00
Brian Simpson
102a7e3028 Vagrantfile: Update box url and checksum 2016-01-04 09:07:18 -08:00
Neil Williams
07f4341ef4 Revert "vote: Remove ByDay CFs"
This will come back soon, just need to get one more thing weened off
these CFs.
2015-12-30 14:10:51 -08:00
Neil Williams
489adbf3d2 vote: Remove ByDay CFs
These are hurting compaction and only used in the about stats.
2015-12-30 11:01:44 -08:00
umbrae
27d6b9a6f7 Sticky Comments: Move sorting to builder
Using a sort value for sticky comments was leading to a lot of pain
when dealing with rendering edge cases (specifically hiding children).
Using this approach we more directly special case the sticky comment
and explicitly do not render its children when viewing top level
comments, which is much cleaner.

P.S. This is almost entirely @bsimpson63's code and idea, with some
extra docs. Thank you Brian!
2015-12-22 13:03:56 -08:00
David Wick
148731a54b GTM: Use iframe.name to bootstrap data on load.
If the data layer variable (`googleTagManager` in this case) isn't initialized
when loading GTM than you cannot use page view triggers with data layer
variables.
2015-12-21 16:23:13 -08:00