influxdata / influxdata/influxdb-java
BatchProcessor exception handler is not triggering
- Lingua principale
- Java
- Stelle
- 1.2k
- Fork
- 469
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Expected behaviour:
When registering an exceptionHandler in BatchOptions, it should be invoked when data cannot be written.
Actual behaviour:
The handler isn't invoked, not even when attempting to write to a database that cannot even be connected to (because it doesn't exist). Log calls invoked by it are not showing up in the log, and debugging breakpoints set in the handler are never triggered.
This is how I register the handler (Kotlin syntax, but you should easily get the idea):
```
InfluxDBFactory.connect(props.uri, props.user, props.password).apply {
setDatabase(props.name)
enableBatch(BatchOptions.DEFAULTS.exceptionHandler { point, e ->
log.error("Error during write", e)
})
}
```
I can run this code against a bogus uri, and the handler doesn't trigger. Am I doing something completely wrong here?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start with BatchOptions.exceptionHandler, enableBatch, and the BatchProcessor path used after InfluxDBFactory.connect. Reproduce the report with a bogus URI and trace whether write failures reach the registered handler. Done means the handler is invoked and its log output is observable for an unwritable database.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- backend, databases
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100