influxdata / influxdata/influxdb-java

Batching Enhancements

Abierto
#289 6 comentarios 0 reacciones 0 asignados Ver en GitHub
kind/enhancement
Lenguaje dominante
Java
Estrellas
1.2k
Forks
469
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I'm building an InfluxDB producer that I'd like to guarantee at-least-once delivery for. My throughput requirements are high enough that batching is required. I was happy when I found BatchProcessor but then realized a couple of shortcomings that are preventing me from using it. I'd rather improve this library than create my own batch producer. Here's where the current batch implementation is falling short. Are any of these being worked on currently?

1. There's no way to request the batch buffer to be flushed and not destroy the backing thread pool. The only option I see possible today without resorting to reflection is calling `InfluxDB.disableBatch` followed by `InfluxDB.enableBatch` to force a flush but that creates a new executor every time.
1. ~~`BatchProcessor.write()` is not thread safe and may be called concurrently from `BatchProcessor.flush()` on the current thread and the scheduled timer on the thread from the pool. This results in duplicate records being sent during `flush()`.~~
1. Batching records can silently fail. I'd like to provide a callback with each asynchronous write request that would be invoked once the point is sent or if an error was encountered while attempting to send it.
1. The consistency level for all BatchPoints produced by the BatchProcessor is `ConsistencyLevel.ONE`. Direct control over the consistently level would be nice but ONE is a show stopper.

Some of the above are fairly substantial deviations in behavior from the current version. Would it be worthwhile for this to be a separate batch implementation rather than migrating the current version? Perhaps create a new asynchronous interface named `InfluxDBAsync`?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Revisa primero la API existente de BatchProcessor y el flujo de InfluxDB.disableBatch e InfluxDB.enableBatch. Determina si el vaciado sin reemplazar el executor, las callbacks de error asíncronas, la consistencia configurable y las escrituras seguras para subprocesos deben formar parte de la implementación actual o de una nueva interfaz InfluxDBAsync. Se considerará terminado cuando el diseño elegido aborde los requisitos de batching indicados sin dejar silenciosos los fallos de entrega.

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

Evaluación

Stack tecnológico
java
Área
databases
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.