Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(server): Rate limit outcomes emited only for events on "fast-path" #809

Merged
merged 6 commits into from
Oct 15, 2020

Conversation

RaduW
Copy link
Contributor

@RaduW RaduW commented Oct 14, 2020

Fixes outcome generation on the "fast-path" i.e. when we know from the cache that we are rate limited and
we don't try to process the envelope.

Rate limited outcomes are generated on the normal "slow path" but since
rate limits are cached, there is a fast path that checks the cache and
fails fast if know we are above the rate limit. Here we were also
generating invalid outcomes
@RaduW RaduW requested review from a team and jan-auer October 14, 2020 16:32
CHANGELOG.md Outdated Show resolved Hide resolved
relay-quotas/src/rate_limit.rs Outdated Show resolved Hide resolved
relay-server/src/actors/events.rs Outdated Show resolved Hide resolved
relay-server/src/endpoints/common.rs Show resolved Hide resolved
@RaduW RaduW requested a review from jan-auer October 15, 2020 08:03
@jan-auer jan-auer merged commit 647a6eb into master Oct 15, 2020
@jan-auer jan-auer deleted the fix/event-outcomes2 branch October 15, 2020 11:47
jan-auer added a commit that referenced this pull request Oct 15, 2020
* master:
  ref(pii): Use external utf16string crate (#807)
  feat(pii): Merge padding and masking characters (#810)
  fix(server): Rate limit outcomes emited only for events on "fast-path" (#809)
  fix(server): Rate limit outcomes emited only for events (#806)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants