Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Commit 2da4af4

Browse files
committed
fix(elasticsearch): ignore conflict errors
1 parent 8e7eb1b commit 2da4af4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/elasticsearch/elasticsearch.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ func (d recordDatabase) Insert(records []*models.ElasticRecord) (*InsertResponse
8888
}
8989
overloaded := false
9090
for _, f := range failed {
91-
level.Error(d.logger).Log("record", f, "message", "failed to insert!")
91+
if f.Status == http.StatusConflict {
92+
continue
93+
}
9294
retry = append(retry, recordMap[f.Id])
9395
if f.Status == http.StatusTooManyRequests {
9496
//es is overloaded, backoff

0 commit comments

Comments
 (0)