Skip to content

egress rate limiter should fail closed when state lock is poisoned #1279

Description

@cedric013

Problem

The egress rate limiter currently panics if its process-local rate state mutex is poisoned. This can turn a prior panic while holding the lock into repeated production panics on future egress checks.

Expected behavior

If the limiter state is poisoned, egress should fail closed and return false rather than panic or bypass the configured rate limit.

Scope

  • Replace the panicking lock acquisition in core::egress::check_rate.
  • Add a regression test for poisoned state handling.
  • Keep the change limited to the egress limiter path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: highImportant — schedule soonproxyProxy / request rewriting / history pruningstatus: integratedFix merged to main but NOT yet in a tagged release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions