I did an experiment to see if DenormalizedRelation would need the
LastModified stuff, since it takes heavy advantage of row-level bloom
filters. It turns out that there are a huge number of completely
not-found rows being fetched per second that LastModified would save us
from doing a round trip for.
Since LastModified is shared between several relations in a single
request, and CommentVote, Save, and Hide will be denormalized soon, this
should give us a good amount of savings in the long run.
Thrift will materialize the entire result set into memory before
returning it to the client, so requesting very large numbers of columns
is quite detrimental to the server's health. Instead of increasing the
max_column_count ad infinitum, we'll fetch the columns in batches when
the model tells us that's desired.
The previous 300x100 traffic links weren't actually helpful as 300x100s
generally have a campaign added onto the codename. This finds campaigns
that have been seen in a subreddit recently and links them on the
subreddit traffic page.
During some errors, additional tracebacks
were being generated due to the attempted
reference to c.user before it had been properly
set. This should protect against that and let
the proper errors go through.
This is in preparation for some enhancements
to l2cs that require it to have a decent interface
(i.e., it's going to require unicode rather than
accepting either byte strings or unicode)
If a specific link has ridiculous traffic, we can inform the
apps (via ZK live config) that votes on it should be sent to a
separate, dedicated, queue to avoid overwhelming the rest of the
system.
The InterestBar template is rendered on /reddits/ and will error out
for compact and mobile unless a template file exists. Since we don't
have a version for compact or mobile yet, just use empty templates.
Adds campaign to weights of current promos and passes it up to the
spotlight render function to make it available for tracking at runtime.
Notes about rollout:
- This change modifies the live promotions data structure stored in permacache.
To prevent exceptions during rollout, it adds a version number to
the promotion key. Preload the new data structure before pushing this
change by running promote.make_daily_promotions() from staging with the
new code.