zulip/zerver
Alex Vandiver 7988aad159 user_message: Use INSERT ... ON CONFLICT for historical UM creation.
Rather than use a bulk insert via Django, use the faster
`bulk_insert_all_ums` that we already have.  This also adds a `ON
CONFLICT` clause, to make the insert resilient to race conditions.

There are currently two callsites, with different desired `ON
CONFLICT` behaviours:
 - For `notify_reaction_update`, if the `UserMessage` had already been
   created, we would have done nothing to change it.
 - For `do_update_message_flags`, we would have ensured a specific bit
   was (un)set.

Extend `create_historical_user_messages` and `bulk_insert_all_ums` to
support `ON CONFLICT (...) UPDATE SET flags = ...`.
2024-03-26 10:52:37 -07:00
..
actions user_message: Use INSERT ... ON CONFLICT for historical UM creation. 2024-03-26 10:52:37 -07:00
data_import refactor: Replace HUDDLE with DIRECT_MESSAGE_GROUP. 2024-03-21 16:39:33 -07:00
integration_fixtures/nagios
lib user_message: Use INSERT ... ON CONFLICT for historical UM creation. 2024-03-26 10:52:37 -07:00
management register_server: Check write access to secrets file when rotate_key. 2024-03-22 09:33:00 -07:00
migrations semgrep: Enforce no bare select_related() calls. 2024-03-22 09:30:17 -07:00
models messages: Stop joining through every table. 2024-03-22 09:30:17 -07:00
openapi custom_profile_fields: Add "required" parameter to the profile fields. 2024-03-21 10:48:54 -07:00
tests user_message: Use INSERT ... ON CONFLICT for historical UM creation. 2024-03-26 10:52:37 -07:00
tornado ruff: Fix PLW0108 Lambda may be unnecessary. 2024-03-01 09:30:04 -08:00
transaction_tests ruff: Fix PLW0108 Lambda may be unnecessary. 2024-03-01 09:30:04 -08:00
views messages: Use overloads to only return a user_message if needed. 2024-03-22 09:30:17 -07:00
webhooks ruff: Fix E226 Missing whitespace around arithmetic operator. 2024-03-01 09:30:04 -08:00
worker missedmessage_emails: Add Sentry spans to worker thread. 2024-03-21 12:46:13 -07:00
__init__.py
apps.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
context_processors.py python: Reformat with Ruff formatter. 2024-02-29 17:07:16 -08:00
decorator.py python: Reformat with Ruff formatter. 2024-02-29 17:07:16 -08:00
filters.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
forms.py email_validation: Merge two implementations of a disposable-email check. 2024-02-27 10:19:23 -08:00
logging_handlers.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
middleware.py parse_client: Migrate has_request_variables to typed_endpoint. 2024-03-12 13:27:21 -07:00
signals.py timezone: Only look up canonical time zones from the system. 2024-03-01 17:38:08 -08:00