The validators were extraneous because they were raising a custom
exception when attempting to write a too-large value, but on its
own memcached will give an error (pylibmc gives ServerError).
Instead of using a pool with a single client, use a pool of
`num_mc_clients` clients. This prevents exhausting the pool in
concurrent setups, such as the default local install of reddit.
This was used to gather information about our use of lookups with and
without data attributes. Now we always load data attributes, and lookup
rates exist in graphite at "stats.cache.thingcache.{classname}" and
"stats.cache.thingcache.stale.{classname}".
This was generally overkill and we should just assume that any cluster with
the correct name is compatible. Doing the extra checks was running into
AWS ratelimiting.
This replaces the relative/fuzzy timestamp ("8 hours ago", etc.) when
hovering over an approval checkmark with the full UTC timestamp, which
is generally more useful info and can be more easily compared with
things like the time the post was made.
If our format_number() and format_percent() wrappers (around the babel
functions) aren't passed a locale argument, they will use c.locale. But
in some cases, c.locale will return an empty string, which will then be
used when calling the babel functions. The locale-parsing in babel is
unable to handle an empty string, and will throw an exception.
This commit changes these wrappers slightly so that if c.locale is also
empty, the wrappers will instead call the babel functions without a
locale argument, which will cause it to default to the LC_NUMERIC
environment variable.
Deleted users are automatically removed from friends lists 90 days after
the account is deleted, but until that happens it's possible that their
posts will still show up in /r/friends. This will only occur if the
viewer has fewer friends than the limit used to build /r/friends, since
that causes a shortcut case that just returns all of their friends. If
they have more friends than the limit, the functions like
get_recently_submitted_friend_ids() will already filter out deleted/spam
users, but the shortcut doesn't do any filtering.
This commit adds similar filtering into the keep_fn() for
ListingController and CommentsController, which will filter out any
remaining posts by deleted/spam users at display-time. This was
preferable to just removing the shortcut and having all users query
for friends, since that query is fairly slow.
With some experimentation, we've determined that it is not necessary for
the site to function these days. There's no noticeable effect on p90 or
p99 response times in the loggedout cache pool and several large traffic
events have occurred while the pagecache was off. By removing this
layer, we reduce complexity, remove a possible source of poisoning bugs,
and make it easier to do stuff like logged out A/B experiments.
Rather than having the validator issue the 403 on improper signing, this moves the handling into the controller and therefore allows signing errors to be logged as part of a failed login_event.
Additionally, some persistent time-related issues with android's v1 implementation needs debugging. This disables the epoch check but will still persist the error and timing info on the login_event.
The date strings should sort correctly and for some reason the format of the
date strings aren't consistent so they can't be reliably converted to
datetimes.
This wasn't used. The implementation might have run into problems with
overly long cache keys because it used a concatenation of the cache keys
of all the sub queries. If we really want to get some caching here the
sub queries should have read_cache/write_cache set.
Specify the user that was removed in the subject line (instead of `You've been removed...`, it's `{user} has been removed...`) and start the message body with `{user}: You have been been removed...` (instead of just `You have been removed`).
Endpoint for retrieving subreddits to make new
users aware of without actually subscribing
them while doing the onboarding process.
The list of featured subreddits will be managed
separately from the default ones.
For testing purposes, we add a subreddit to show
up via the inject_test_data script.