You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
- Support chunking
7
7
- Add a databaseExists method to InfluxDB interface
8
8
-[Issue #289] (https://github.com/influxdata/influxdb-java/issues/289) Batching enhancements: Pending asynchronous writes can be explicitly flushed via `InfluxDB.flush()`.
9
+
- Add a listener to notify asynchronous errors during batch flushes (https://github.com/influxdata/influxdb-java/pull/318).
Copy file name to clipboardexpand all lines: README.md
+10-1
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,16 @@ Query query = new Query("SELECT idle FROM cpu", dbName);
75
75
influxDB.query(query);
76
76
influxDB.deleteDatabase(dbName);
77
77
```
78
-
Note that the batching functionality creates an internal thread pool that needs to be shutdown explicitly as part of a gracefull application shut-down, or the application will not shut down properly. To do so simply call: ```influxDB.close()```
78
+
Note that the batching functionality creates an internal thread pool that needs to be shutdown explicitly as part of a graceful application shut-down, or the application will not shut down properly. To do so simply call: ```influxDB.close()```
79
+
80
+
Also note that any errors that happen during the batch flush won't leak into the caller of the `write` method. By default, any kind of errors will be just logged with "SEVERE" level.
81
+
82
+
If you need to be notified and do some custom logic when such asynchronous errors happen, you can add an error handler with a `BiConsumer<Iterable<Point>, Throwable>` using the overloaded `enableBatch` method:
0 commit comments