Skip to content

ServiceClient does not respect max retries and may lead to infinite retries (introduced in version 1.2.6) #511

Closed

Description

@mariusd-dnv

The 1.2.6 patch added support for cancellation token in retries.

However, the change does not respect that retryCount is exceeded.

If the exception is a "permanent error" the retry will continue in the catch-block until a cancellation is requested. If no cancellation is requested the retry will continue in an infinite loop.

I think this change in src/GeneralTools/DataverseClient/Client/ServiceClient.cs line 1879 is causing the loop:
retry = ShouldRetry(req, ex, retryCount, out isThrottled) || !cancellationToken.IsCancellationRequested;

IMO this should be a && (AND) test instead of a || (OR).

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