Aiven-Open / Aiven-Open/opensearch-connector-for-apache-kafka

Retry on conflict should have its own config

Đang mở
#439 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
95
Fork
61
Merge trung bình
11 giờ 52 phút
Pull request đã merge (30 ngày)
7

Mô tả

Hi, currently retry on conflict value is coupled to max.inflight.request, meaning that if we set max.inflight.request to 1, then the retry on conflict value will be 1. And it is capped at 3. Is there any reasoning why retry on conflict doesn't have their own config instead of coupling it with the inflight request and capped it to 3 ?

```
if (config.indexWriteMethod() == IndexWriteMethod.UPSERT) {
bulkOperation = BulkOperation.of(b -> b.update(u -> u.id(documentId)
.index(indexName)
.routing(routing)
.document(binaryData)
.upsert(binaryData)
.docAsUpsert(true)
.retryOnConflict(Math.min(config.maxInFlightRequests(), 3))));
```

I can help to make a PR if this is not intended.

Thank you

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.