influxdata / influxdata/influxdb-java
BatchProcessor exception handler is not triggering
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 469
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100