Specifications
- Client Version:
com.influxdb:influxdb3-java:1.9.0
- InfluxDB Version:
influxdb:3-core (Docker)
- Platform: MacOS 26.3.1 on M2 Max
Code sample to reproduce problem
Point(measurement).apply {
setTimestamp(date)
}
writePoints(measurements, WriteOptions.Builder().precision(WritePrecision.MS).build())
Expected behavior
When the point is written, the timestamp of the Point is converted to an number at the precision of the WriteOptions from the precision stored on the Point - always NS (NanosecondConverter.convertToNanos(time, precision);)
Actual behavior
There is an error when sending the data
HTTP status code: 400; Message: write buffer error: line protocol parse failed: timestamp, 1778179743159904000, out of range for precision: Millisecond
This is because when the LP is generated the target precision is not passed in
line = ((Point) item).toLineProtocol(null, defaultTags, tagOrder);
As null is passed into WritePrecision no conversion takes place so NS is always sent. This means that the request sends MS as the precision in the query params but sends NS on each LP item.
Additional info
I can't see a workaround
Specifications
com.influxdb:influxdb3-java:1.9.0influxdb:3-core(Docker)Code sample to reproduce problem
Expected behavior
When the point is written, the timestamp of the
Pointis converted to an number at the precision of theWriteOptionsfrom the precision stored on thePoint- always NS (NanosecondConverter.convertToNanos(time, precision);)Actual behavior
There is an error when sending the data
This is because when the LP is generated the target precision is not passed in
As
nullis passed intoWritePrecisionno conversion takes place so NS is always sent. This means that the request sends MS as the precision in the query params but sends NS on each LP item.Additional info
I can't see a workaround