Skip to content

AsyncEventHandler drops impressions/conversions on a transient HTTP 5xx #644

Open

Description

AsyncEventHandler.EventDispatcher.run() makes a single httpClient.execute(...); the response handler throws on any non-2xx, which happens after the client's transport retry (it only retries IOExceptions), and the catch just logs it. So one 500/502/503 from the events endpoint silently drops the impression or conversion. Two tests added to AsyncEventHandlerTest fail on master and reproduce it. Proposal: retry 5xx only (not 4xx) a bounded number of times (e.g. 3 attempts, 100/200 ms backoff) in the dispatcher; a retry after a 5xx that arrived post-acceptance could duplicate an event, so I'd also be fine making it configurable or off by default. Happy to open a PR with whichever policy you prefer.

This comment was prepared with assistance from an AI coding assistant (Anthropic Claude).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions