Problem
When writing a batch of line protocol records where even a single record has a schema conflict (e.g., integer value for a column previously defined as float), the SDK throws InfluxDBApiHttpException and the entire batch is treated as failed. There is no way for the caller to know that some records in the batch were actually written successfully by the server.
Server Capability Exists But SDK Cannot Leverage It!
Reference: https://docs.influxdata.com/influxdb3/enterprise/write-data/http-api/v3-write-lp/
The InfluxDB v3 /api/v3/write_lp endpoint supports the accept_partial query parameter (default: true). When enabled, the server writes all valid lines and returns HTTP 400 with structured details identifying only the rejected lines:
{
"error": "partial write of line protocol occurred",
"data": [
{
"error_message": "invalid column type for column 'temp'...",
"line_number": 2,
"original_line": "..."
}
]
}
Gaps in SDK
Gap 1: /api/v3/write_lp is only accessible when noSync=true
In InfluxDBClientImpl.writeData(), the endpoint selection is:
-
noSync=true→/api/v3/write_lp -
noSync=false(default) →/api/v2/write
There is no way to use the v3 write endpoint without also opting into noSync. The /api/v2/write endpoint does not support accept_partial.
Gap 2: HTTP 400 always throws, even on partial success
In RestClient.request(), any response with status code outside 200–299 throws InfluxDBApiHttpException.
When accept_partial=true and the server returns HTTP 400, valid lines may have been written, but the SDK reports the entire operation as failed. The caller has no programmatic way to determine which lines succeeded and which failed.
Desired Outcome
SDK consumers need the ability to
- Use the
/api/v3/write_lpendpoint withaccept_partialsupport - Programmatically distinguish between total failure and partial failure
- Identify which specific lines in a batch failed (line number, error message, original line)
