From fb45ee4fd9eb249ce3b4b0b0e2a669c8e2f8abfb Mon Sep 17 00:00:00 2001 From: Luke Kim <80174+lukekim@users.noreply.github.com> Date: Wed, 25 Mar 2026 21:41:59 -0700 Subject: [PATCH] feat: Update version to 0.6.0 and enhance documentation with release notes --- README.md | 4 +- docs/release_notes/v0.6.0.md | 83 +++++++++++++++++++++++++++++ pom.xml | 26 ++++----- src/main/java/ai/spice/Version.java | 2 +- 4 files changed, 99 insertions(+), 16 deletions(-) create mode 100644 docs/release_notes/v0.6.0.md diff --git a/README.md b/README.md index f13f226..93247a4 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Add the following dependency to your Maven project: ai.spice spiceai - 0.5.0 + 0.6.0 compile ``` @@ -22,7 +22,7 @@ Add the following dependency to your Maven project: Add the following dependency to your Gradle project: ```groovy -implementation 'ai.spice:spiceai:0.5.0' +implementation 'ai.spice:spiceai:0.6.0' ``` ### Manual installation diff --git a/docs/release_notes/v0.6.0.md b/docs/release_notes/v0.6.0.md new file mode 100644 index 0000000..930774f --- /dev/null +++ b/docs/release_notes/v0.6.0.md @@ -0,0 +1,83 @@ +# Spice Java SDK v0.6.0 + +## Highlights + +This release focuses on **transport resilience** and **dependency upgrades**. A new `reset()` method provides manual recovery from stuck transport connections, gRPC keep-alive detects dead connections early, and DNS re-resolution enables automatic recovery from load-balancer IP rotation. + +## What's New + +### 🔄 Connection Reset + +The SDK now supports a `reset()` method for manual transport recovery. When the underlying gRPC connection becomes permanently stuck (e.g. TLS handshake to a wrong backend, persistent `UNAVAILABLE` after retries), `reset()` discards the bad connection and immediately establishes a fresh one: + +```java +SpiceClient client = SpiceClient.builder() + .withApiKey(API_KEY) + .withSpiceCloud() + .build(); + +try { + try (FlightStream stream = client.query(sql)) { + // process results... + } +} catch (ExecutionException e) { + if (isTransportFailure(e.getCause())) { + client.reset(); // discard bad transport, reconnect immediately + try (FlightStream stream = client.query(sql)) { + // process results with fresh connection... + } + } else { + throw e; + } +} +``` + +Key behaviors: +- Thread-safe (`synchronized`) — concurrent reset calls are serialized +- Idempotent — safe to call multiple times +- Throws `IllegalStateException` if client is already closed +- Resets both Flight and ADBC connections + +### 🏥 gRPC Keep-Alive + +HTTP/2 keep-alive pings are now enabled by default to detect dead connections quickly: + +- **Keep-alive interval**: 30 seconds +- **Keep-alive timeout**: 10 seconds +- **Keep-alive without calls**: enabled (pings even when idle) + +### 🌐 DNS Re-Resolution + +The SDK now uses `dns:///` target resolution for gRPC channels, enabling periodic hostname re-resolution. This allows clients to automatically recover from load-balancer IP rotation (e.g. AWS NLB) without manual intervention. + +**DNS cache TTL:** For more aggressive DNS refresh (recommended for cloud-deployed clients), set the JVM property: + +```bash +-Dnetworkaddress.cache.ttl=30 +``` + +### 🛡️ Lazy Transport Recovery + +A new `ensureFlightClient()` safety net automatically rebuilds the Flight client if the internal reference is null at query time, adding an extra layer of resilience. + +## ⬆️ Updated Dependencies + +| Dependency | Previous | Current | +| ----------------------------------- | ------------- | ------------ | +| Apache Arrow Flight SQL | 18.3.0 | 19.0.0 | +| Apache Arrow ADBC Driver Flight SQL | 0.21.0 | 0.22.0 | +| Apache Arrow ADBC Core | 0.21.0 | 0.22.0 | +| Gson | 2.13.1 | 2.13.2 | +| Netty | 4.1.130.Final | 4.2.12.Final | + +## 🔧 Updated Build Plugins + +| Plugin | Previous | Current | +| ------------------------------- | -------- | ------- | +| maven-surefire-plugin | 3.5.4 | 3.5.5 | +| maven-source-plugin | 3.3.1 | 3.4.0 | +| central-publishing-maven-plugin | 0.9.0 | 0.10.0 | +| spotbugs-maven-plugin | 4.9.3.0 | 4.9.8.2 | +| dependency-check-maven | 12.1.1 | 12.2.0 | +| jacoco-maven-plugin | 0.8.13 | 0.8.14 | +| maven-enforcer-plugin | 3.5.0 | 3.6.2 | diff --git a/pom.xml b/pom.xml index 6784986..866d769 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ ai.spice spiceai jar - 0.5.0 + 0.6.0 Java Spice SDK https://github.com/spiceai/spice-java/ Spice provides a unified SQL query interface and portable runtime to locally materialize, accelerate, and query datasets from any database, data warehouse, or data lake. @@ -36,22 +36,22 @@ org.apache.arrow flight-sql - 18.3.0 + 19.0.0 org.apache.arrow.adbc adbc-driver-flight-sql - 0.21.0 + 0.22.0 org.apache.arrow.adbc adbc-core - 0.21.0 + 0.22.0 com.google.code.gson gson - 2.13.1 + 2.13.2 com.github.rholder @@ -61,7 +61,7 @@ io.netty netty-all - 4.1.130.Final + 4.2.12.Final org.slf4j @@ -87,7 +87,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.4 + 3.5.5 @{argLine} --add-opens=java.base/java.nio=ALL-UNNAMED @@ -96,7 +96,7 @@ org.apache.maven.plugins maven-source-plugin - 3.3.1 + 3.4.0 attach-sources @@ -141,7 +141,7 @@ org.sonatype.central central-publishing-maven-plugin - 0.9.0 + 0.10.0 true central @@ -153,7 +153,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.9.3.0 + 4.9.8.2 spotbugs-exclude.xml @@ -162,7 +162,7 @@ org.owasp dependency-check-maven - 12.1.1 + 12.2.0 7 @@ -171,7 +171,7 @@ org.jacoco jacoco-maven-plugin - 0.8.13 + 0.8.14 prepare-agent @@ -192,7 +192,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.5.0 + 3.6.2 enforce diff --git a/src/main/java/ai/spice/Version.java b/src/main/java/ai/spice/Version.java index e278d67..23d79a7 100644 --- a/src/main/java/ai/spice/Version.java +++ b/src/main/java/ai/spice/Version.java @@ -30,6 +30,6 @@ public class Version { public static final String SPICE_JAVA_VERSION; static { - SPICE_JAVA_VERSION = "0.5.0"; + SPICE_JAVA_VERSION = "0.6.0"; } }