zulip/zerver
Alex Vandiver dd954749be zilencer: Log, and drop, duplicated rows from remote servers.
This may happen if there are multiple servers with the same UUID
submitting data (e.g. if they were cloned after initial creation), or
if there is one server, but `./manage.py clear_analytics_tables` was
used to truncate the analytics tables.

In the case of `clear_analytics_tables`, the data submitted likely has
identical historical values with new remote `id` values; preserving
the originally-submitted contemporaneous data is the best option.  For
the case of submissions from multiple servers, there is no completely
sensible outcome, so the best we can do is detect the case and move
on.

Since we have a lock on the RemoteZulipServer, we know that no other
inserts are happening, so counting before and after will return the
true number of rows inserted (which `bulk_create` cannot do in the
face of `ignore_conflicts`[^1]).  We compare this to the expected
number of new inserted rows to detect dropped duplicates.

[^1]: See https://code.djangoproject.com/ticket/30138.
2023-11-21 11:44:55 -08:00
..
actions streams: Send stream deletion events on unsubscribing users. 2023-11-16 13:25:33 -05:00
data_import import_util: Remove uuid and uuid_owner_secret from realm dict. 2023-10-18 11:00:49 -07:00
integration_fixtures/nagios
lib analytics: Slew record reporting by up to 10 minutes. 2023-11-21 10:49:57 -08:00
management management: Allow changing is_billing_admin using change_user_role. 2023-11-15 18:36:07 -08:00
migrations settings: Add option for followed topics to unread count badge setting. 2023-11-17 14:07:20 -08:00
openapi settings: Add option for followed topics to unread count badge setting. 2023-11-17 14:07:20 -08:00
tests zilencer: Log, and drop, duplicated rows from remote servers. 2023-11-21 11:44:55 -08:00
tornado mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
transaction_tests mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
views streams: Fix unsorted import. 2023-11-16 19:02:13 +00:00
webhooks integrations: Recommend new integration URL tool. 2023-11-08 14:19:05 -08:00
worker mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
__init__.py
apps.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
context_processors.py portico: Skip footer and adjust header on invalid realm. 2023-11-01 11:24:12 -07:00
decorator.py decorator: Drop the stack_info on most WebhookErrors. 2023-10-12 10:06:31 -07:00
filters.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
forms.py registration: Set the organization language at creation time. 2023-10-26 16:27:35 -07:00
logging_handlers.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
middleware.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
models.py billing: Allow user to switch between billing frequencies. 2023-11-21 10:42:12 -08:00
signals.py demo-orgs: Create dev environment demo organization without email. 2023-08-31 15:02:16 -07:00