influxdata / influxdata/influxdb-java
influxdb-java drops data when using OneShotBatchWriter if any error is encountered
- Ngôn ngữ chính
- Java
- Star
- 1.2k
- Fork
- 469
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I understand that OneShotBatchWriter gets one shot to write its points to influxdb, but I found when importing historical data through influxdb-java, that the OneShotBatchWriter stops processing its list of BatchPoints as soon as an error happens.
Example:
```
@Test
public void test()
{
// Use OneShotBatchWriter
db.enableBatch(5_000, 1, TimeUnit.SECONDS);
// CPU might make it to influx, or might not depending on the order that OneShotBatchWriter writes them in
db.write(databaseName,
"one_day",
Point.measurement("cpu")
.time(System.currentTimeMillis(), TimeUnit.MILLISECONDS)
.addField("cpu", 1)
.build());
// Memory dropped by influxdb
db.write(databaseName,
"one_week",
Point.measurement("memory")
.time(0, TimeUnit.MILLISECONDS)
.addField("memory", 1)
.build());
db.disableBatch();
}
```
The memory point is dropped by influxdb which results in an error back to influxdb-java, which promptly gives up on the cpu point. I like how simple OneShotBatchWriter is and don't need to retry points like RetryCapableBatchWriter, but could OneShotBatchWriter at least try all points?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu từ entry point của OneShotBatchWriter và tái hiện kịch bản kiểm thử được cung cấp với hai BatchPoints, bao gồm một point bị InfluxDB từ chối. Theo dõi lỗi ảnh hưởng như thế nào đến các point tiếp theo và thêm coverage cho thấy mọi point đều được thử; hoàn tất khi point CPU hợp lệ không bị loại bỏ khi point memory thất bại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- backend-api-design
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100