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

Add retry on 429 error code #455

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hovaesco
Copy link
Member

@hovaesco hovaesco commented Mar 1, 2024

Description

Add retry on 429 error code

Non-technical explanation

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Mar 1, 2024
@hovaesco hovaesco requested review from aalbu and hashhar March 1, 2024 15:11
lambda response: getattr(response, "status_code", None)
in (502, 503, 504),
in (429, 502, 503, 504),
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to add any delays for the retry? Immediate retry will just make the problem worse (not sure if that's already built in)

Copy link
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

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

This isn’t part of the Trino protocol. Before we add this here, it needs to be specified in the protocol, which will require more details. How long should the client wait? Is there a standard header for this?

@electrum
Copy link
Member

electrum commented Mar 1, 2024

This behavior needs to be specified in https://trino.io/docs/current/develop/client-protocol.html

There is a standard Retry-After header.

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

Successfully merging this pull request may close these issues.

None yet

3 participants