Aiven-Open / Aiven-Open/opensearch-connector-for-apache-kafka
Retry on conflict should have its own config
- Langage dominant
- Java
- Étoiles
- 95
- Forks
- 61
- Merge moyen
- 11 h 52 min
- PR mergées (30 j)
- 7
Description
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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start at the UPSERT branch shown in the issue, then trace how max.inflight.request is defined and passed through the connector configuration. Done means retryOnConflict is controlled by its own configuration rather than Math.min(config.maxInFlightRequests(), 3), with the resulting behavior covered by the relevant project tests.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, kafka
- Domaine
- backend, distributed-systems, search
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 62/100