Skip to content

Commit

Permalink
fix: only retry when receiving a 429 status code (#13523)
Browse files Browse the repository at this point in the history
The only safe status code to retry is 429 because it guarantee that the
document has not been indexed. Everything else might create duplicate documents
  • Loading branch information
kruskall authored Jul 16, 2024
1 parent 4c71aa5 commit b6626d7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions internal/elasticsearch/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ import (

var retryableStatuses = []int{
http.StatusTooManyRequests,
http.StatusBadGateway,
http.StatusServiceUnavailable,
http.StatusGatewayTimeout,
}

var userAgent = fmt.Sprintf("Elastic-APM-Server/%s go-elasticsearch/%s", version.Version, esv8.Version)
Expand Down

0 comments on commit b6626d7

Please sign in to comment.