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

Implement retry options #575

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Implement retry options #575

wants to merge 5 commits into from

Conversation

ptpaterson
Copy link
Contributor

@ptpaterson ptpaterson commented Jan 21, 2025

FE-6286

Problem

We do not expose the following query options to users:

  • v4 queries
    • contention retries
  • v10 queries
    • contention retries
    • throttling retry max_attempts
    • throttling retry max_backoff

The contention retries and throttling retries are slightly separate concerns, but I got confused and ended up with both sets of additional options in this PR.

Solution

Add the options to the QUERY_OPTIONS constant and pipe them into v4 and v10 queries.

The v4 driver does not have an explicit option for configuring the x-fauna-max-contention-retries header, but it does accept an object with headers that are included with the query.

Testing

Added/updated tests to show we're passing the options to the drivers.

@ptpaterson ptpaterson requested a review from a team as a code owner January 21, 2025 21:45
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.

1 participant