zulip/zerver
Tim Abbott 2aab71e153 event_queue: Fix confusing event_queue.push interface.
In e3ad9baf1d, we introduced yet another
bug where we incorrectly shared event dictionaries between multiple
queues.

Fortunately, the logging that reports on "event was not in the queue"
issues worked and detected this on chat.zulip.org, but this is a clear
indication that the comments we have around this system were not
sufficient to produce correct behavior.

We fix this by changing event_queue.push, the code that mutates the
event dictionaries, to do the shallow copies itself.  The only
downside here is process_message_event, a relatively low-traffic code
path, does an extra per-queue dictionary copy.  Given that presence,
heartbeat, and message reading events are likely more traffic and
dealing with HTTP is likely much more expensive than a dictionary
copy, this probably doesn't matter performance-wise.

(And if profiling later finds it is, there are potential workarounds
like passing a skip_copy argument we can do).
2020-02-05 12:40:01 -08:00
..
data_import import: Support importing team icon from slack. 2020-02-03 14:09:05 -08:00
lib test_classes: Use a valid (but reserved as fictional) phone number. 2020-02-05 12:38:10 -08:00
management rate_limiter: Rename 'all' domain to 'api_by_user'. 2020-02-02 19:15:13 -08:00
migrations settings: Migrate to stream_post_policy structure. 2020-02-04 17:08:08 -08:00
openapi settings: Migrate to stream_post_policy structure. 2020-02-04 17:08:08 -08:00
templatetags openapi: Pass api_url to curl example generation. 2019-08-17 11:35:08 -07:00
tests requirements: Upgrade django-sendfile2 from 0.4.3 to 0.5.1. 2020-02-05 12:38:10 -08:00
tornado event_queue: Fix confusing event_queue.push interface. 2020-02-05 12:40:01 -08:00
views requirements: Upgrade django-sendfile2 from 0.4.3 to 0.5.1. 2020-02-05 12:38:10 -08:00
webhooks webhooks/ansibletower: Update for AWX 9.1.1. 2020-02-02 20:21:03 -08:00
worker queue: Remove missedmessage_email_senders. 2020-01-31 12:13:51 -08:00
__init__.py
apps.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
context_processors.py login: Make authentication_methods data available to JavaScript. 2020-02-02 20:22:49 -08:00
decorator.py rate_limiter: Rename 'all' domain to 'api_by_user'. 2020-02-02 19:15:13 -08:00
filters.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
forms.py rate_limiter: Limit the amount of password reset emails to one address. 2020-02-02 19:15:13 -08:00
logging_handlers.py version: Only let `git describe` match tags beginning with a digit. 2019-10-24 14:54:45 -07:00
middleware.py exceptions: RateLimited shouldn't inherit from PermissionDenied. 2020-02-02 19:15:00 -08:00
models.py settings: Migrate to stream_post_policy structure. 2020-02-04 17:08:08 -08:00
signals.py onboarding: Use delivery_email in "new login" notifications. 2019-11-14 12:19:47 -08:00