fix: partial write support and default write endpoint#388
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #388 +/- ##
==========================================
+ Coverage 88.25% 88.29% +0.04%
==========================================
Files 21 21
Lines 1532 1546 +14
Branches 277 279 +2
==========================================
+ Hits 1352 1365 +13
- Misses 82 83 +1
Partials 98 98 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR restores V2 write endpoint defaults while preserving V3-only partial-write and noSync support behind useV2Api=false.
Changes:
- Defaults write routing to the V2 API endpoint and updates related tests/expectations.
- Refines V2/V3 method-not-allowed error messages and partial-write error formatting.
- Updates README and changelog language around partial writes and endpoint compatibility.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/main/java/com/influxdb/v3/client/write/WriteOptions.java |
Changes default write endpoint selection to V2 and updates validation/docs. |
src/main/java/com/influxdb/v3/client/internal/InfluxDBClientImpl.java |
Adds endpoint-specific 405 guidance for V2 and V3 writes. |
src/main/java/com/influxdb/v3/client/internal/RestClient.java |
Adjusts partial-write detail rendering and fallback JSON token formatting. |
src/main/java/com/influxdb/v3/client/InfluxDBClient.java |
Updates public configuration documentation. |
src/main/java/com/influxdb/v3/client/config/ClientConfig.java |
Updates write endpoint configuration documentation. |
src/test/java/... |
Updates and expands tests for defaults, routing, validation, and error formatting. |
README.md |
Documents default V2 writes and V3-only write options. |
CHANGELOG.md |
Records partial-write support and V2 default behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
ad hoc implementation works for use cases mentioned in README.md regarding new write arguments nosync, useV2Api (true and false) and acceptPartial. Checked both ClientConfig settings and WriteOptions settings passed in client.writeRecords(). Calls used partial values generated in line protocol batches.
Tests run using OpenJdk 24.0.2. are passing.
Looks good to me. 🚴 🏁
Just need to rebase with the main branch.
Proposed Changes
This PR finalizes partial-write support and fixes regression issue with the default API endpoint behavior introduced in PR #365.
noSyncacceptPartialChecklist