Skip to content

Commit b6626d7

Browse files
authored
fix: only retry when receiving a 429 status code (elastic#13523)
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
1 parent 4c71aa5 commit b6626d7

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

internal/elasticsearch/client.go

-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ import (
3434

3535
var retryableStatuses = []int{
3636
http.StatusTooManyRequests,
37-
http.StatusBadGateway,
38-
http.StatusServiceUnavailable,
39-
http.StatusGatewayTimeout,
4037
}
4138

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

0 commit comments

Comments
 (0)