Skip to content

Commit 4a77bd9

Browse files
committed
docs: update README
1 parent 88f678b commit 4a77bd9

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,28 @@ String record = "temperature,location=north value=60.0";
144144
client.writeRecord(record);
145145
```
146146

147+
#### Accept partial writes and inspect failed lines
148+
149+
Partial writes are enabled by default.
150+
`acceptPartial` can be configured in three ways: client defaults via `WriteOptions`, connection string / environment variable / system property (`writeAcceptPartial` / `INFLUX_WRITE_ACCEPT_PARTIAL` / `influx.writeAcceptPartial`), or per-write `WriteOptions`.
151+
152+
Set `acceptPartial(false)` to disable partial writes.
153+
With InfluxDB Core/Enterprise, when a write request fails due to one or more invalid lines, the error message starts with:
154+
155+
- `partial write of line protocol occurred` when partial writes are enabled.
156+
- `parsing failed for write_lp endpoint` when partial writes are disabled.
157+
158+
When partial writes are disabled, any rejected line causes all lines to be rejected.
159+
InfluxDB Clustered does not return this structured partial-write error format.
160+
161+
#### Compatibility with InfluxDB Clustered
162+
163+
For InfluxDB Clustered, enable `useV2Api` for writes.
164+
Like other write options, this can be configured in client code, connection string / environment variable / system property (`writeUseV2Api` / `INFLUX_WRITE_USE_V2_API` / `influx.writeUseV2Api`), or per-write `WriteOptions`.
165+
166+
If `useV2Api` is set, `acceptPartial` is ignored because this compatibility mode does not support partial-write controls.
167+
Any rejected line causes all lines to be rejected.
168+
147169
to query your data, you can use code like this:
148170

149171
```java

0 commit comments

Comments
 (0)