Skip to content

Rewrite debounced broadcasts view#1160

Merged
leplatrem merged 5 commits intomainfrom
rewrite-debounce-broadcasts
Feb 5, 2026
Merged

Rewrite debounced broadcasts view#1160
leplatrem merged 5 commits intomainfrom
rewrite-debounce-broadcasts

Conversation

@leplatrem
Copy link
Contributor

@leplatrem leplatrem commented Feb 5, 2026

We should only see Publish logs with at least 5min difference

Screenshot 2026-02-05 at 09 14 49

Plus, the -preview collections were not ignored in the broadcasted timestamps, like they used to with Megaphone:

# We want to filter out preview entries, because we don't want to notify all clients
# when a review is requested. Therefore we can't use the `timestamp` field and must
# get it from filtered entries.
# https://github.com/mozilla/remote-settings/blob/45841c04/kinto-remote-settings/src/kinto_remote_settings/changes/views.py#L40-L44
return str(
max(
e["last_modified"]
for e in changeset["changes"]
if "-preview" not in f"{e['bucket']}/{e['collection']}"
)
)

This is why, this series of Nimbus previews (not consumed by clients, only experiment authors):

Screenshot 2026-02-05 at 12 11 05

gerenated this huge trafic on origins:

Screenshot 2026-02-05 at 12 11 58

cache_key = f"{BROADCASTER_ID}/{CHANNEL_ID}/timestamp"
last_timestamp = request.registry.cache.get(cache_key)
if last_timestamp is None:
last_published_timestamp = request.registry.cache.get(cache_key)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like we lost the max_debounce interval? If we keep getting changes published close together this will force a 5 minute quiet period without a max wait now.

Copy link
Contributor Author

@leplatrem leplatrem Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the tests, we cover this, we now simply publish every 5min. Meaning bursts of publications that last more than 5min can be "cut" into two publications.

@leplatrem leplatrem merged commit e76075b into main Feb 5, 2026
11 checks passed
@leplatrem leplatrem deleted the rewrite-debounce-broadcasts branch February 5, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants