zulip/analytics
Mahhheshh 1198785c62 analytics: Improve do_increment_logging_stat performance.
The previous implementation using Django's `get_or_create` for
`do_increment_logging_stat` involved two separate database queries,
potentially leading to race conditions.

Use an `ON CONFLICT ... DO UPDATE` (aka "upsert") query, which
eliminates race conditions and improves performance.  This is mildly
complicated due to the different unique indexes across the various
tables, and the need for bug-for-bug compatibility with the previous
implementation.

Fixes #28947.

Co-authored-by: Alex Vandiver <alexmv@zulip.com>
2024-05-06 16:34:01 -07:00
..
lib analytics: Improve do_increment_logging_stat performance. 2024-05-06 16:34:01 -07:00
management groups: Use NamedUserGroup for all queries. 2024-04-26 17:03:09 -07:00
migrations analytics: Regenerate partial indexes due to Django bug. 2023-11-16 13:53:04 -08:00
tests analytics: Improve do_increment_logging_stat performance. 2024-05-06 16:34:01 -07:00
views stats: Update translated strings for stream to channel rename. 2024-04-24 14:35:05 -07:00
__init__.py
models.py python: Consistently use from…import for datetime. 2023-12-05 12:01:18 -08:00
urls.py corporate: Move support and activity views to /corporate. 2024-01-30 10:06:48 -08:00