Skip to content

Commit be10d4e

Browse files
authored
chore: update partial-write support to match changes in Core 3.10 release. (#402)
1 parent 7efbaf7 commit be10d4e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/com/influxdb/v3/client/internal/RestClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ private boolean isV3PartialWriteError(@Nullable final String errorMessage) {
374374
}
375375
String normalized = errorMessage.toLowerCase(Locale.ROOT);
376376
return normalized.contains("partial write of line protocol occurred")
377-
|| normalized.contains("parsing failed for write_lp endpoint");
377+
|| normalized.contains("parsing failed for write_lp endpoint") // for Core 3.9 and earlier
378+
|| normalized.contains("line protocol parsing error"); // for Core 3.10 and later
378379
}
379380

380381
private boolean errIsJsonLikeContentType(@Nullable final String contentType) {

src/test/java/com/influxdb/v3/client/integration/E2ETest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public void testWriteErrorWithoutAcceptPartial() throws Exception {
261261
Throwable thrown = Assertions.catchThrowable(() -> client.writeRecord(points, options));
262262
Assertions.assertThat(thrown).isInstanceOf(InfluxDBPartialWriteException.class);
263263
Assertions.assertThat(thrown.getMessage())
264-
.contains("parsing failed for write_lp endpoint");
264+
.contains("line protocol parsing error");
265265

266266
InfluxDBPartialWriteException partialError = (InfluxDBPartialWriteException) thrown;
267267
Assertions.assertThat(partialError.lineErrors()).hasSize(1);

0 commit comments

Comments
 (0)