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

Retries are attempted even if MaxRetries is set to zero #236

Closed
DaveHasteSpringer opened this issue Mar 18, 2021 · 0 comments · Fixed by #237
Closed

Retries are attempted even if MaxRetries is set to zero #236

DaveHasteSpringer opened this issue Mar 18, 2021 · 0 comments · Fixed by #237
Milestone

Comments

@DaveHasteSpringer
Copy link
Contributor

Steps to reproduce:
Given the following client code snippet

	options := influxdb2.DefaultOptions().SetMaxRetries(0)
	client := influxdb2.NewClientWithOptions(url, authToken, options)
	defer client.Close()
	writeAPI := client.WriteAPIBlocking("", dbName)
        err := writeAPI.WritePoint(context.Background(), point)
        if err != nil {
            fmt.Printf("Error: %v", err)
        }

where url is the URL of an InfluxDB instance that is unreachable (i.e. results in a connection error), the WritePoint() method may attempt an implicit deferred retry (instead of immediately returning a connection error), even though MaxRetries was set to 0.

Expected behavior:
The WritePoint() method should always return an error in this case.

Actual behavior:
No error is returned.

Specifications:

  • Client Version: 2.2.2
  • InfluxDB Version: n/a (testing against an unreachable InfluxDB instance)
  • Platform: MacOS 10.15.7
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 a pull request may close this issue.

2 participants