zulip/zilencer
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
..
lib counts: Add function compute_max_monthly_messages for remote servers. 2023-11-08 09:45:49 -08:00
management populate_billing_realms: Increase price_per_license. 2023-11-13 10:35:39 -08:00
migrations zilencer: Apply partial unique constraints for null subgroups. 2023-11-21 11:44:55 -08:00
README.md docs: Format Markdown with Prettier. 2021-09-08 12:06:24 -07:00
__init__.py
auth.py auth: Allow easier bouncer testing in dev env. 2023-11-17 18:32:49 -08:00
models.py zilencer: Apply partial unique constraints for null subgroups. 2023-11-21 11:44:55 -08:00
urls.py push_notifs: Add endpoint for sending a test notification. 2023-10-12 18:15:00 -07:00
views.py zilencer: Log, and drop, duplicated rows from remote servers. 2023-11-21 11:44:55 -08:00

README.md

ZILENCER -- The Zulip license manager

This app is the place for storing state about various deployments of Zulip that exist in the world.