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

Retry on conflict should have its own config

Abierto
#439 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
95
Forks
61
Merge medio
11 h 52 min
PR fusionados (30 d)
7

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java, kafka
Área
backend, distributed-systems, search
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
62/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.