Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Add the following dependency to your Maven project:
<dependency>
<groupId>ai.spice</groupId>
<artifactId>spiceai</artifactId>
<version>0.5.0</version>
<version>0.6.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -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
Expand Down
83 changes: 83 additions & 0 deletions docs/release_notes/v0.6.0.md
Original file line number Diff line number Diff line change
@@ -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 |
Comment on lines +65 to +68

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependency table uses || at the start of each row, which adds an unintended empty column and renders incorrectly in standard Markdown. Use a single leading | for the header and separator rows (and each data row) to match the formatting used in other release notes files.

Copilot uses AI. Check for mistakes.
| 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 |
Comment on lines +75 to +78

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build plugin table also uses || at the start of each row, which renders as an extra empty column in Markdown. Replace the double pipes with a single | at row starts to produce a standard 3-column table.

Copilot uses AI. Check for mistakes.
| 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 |
26 changes: 13 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>ai.spice</groupId>
<artifactId>spiceai</artifactId>
<packaging>jar</packaging>
<version>0.5.0</version>
<version>0.6.0</version>
<name>Java Spice SDK</name>
<url>https://github.com/spiceai/spice-java/</url>
<description>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.</description>
Expand Down Expand Up @@ -36,22 +36,22 @@
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>flight-sql</artifactId>
<version>18.3.0</version>
<version>19.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.arrow.adbc</groupId>
<artifactId>adbc-driver-flight-sql</artifactId>
<version>0.21.0</version>
<version>0.22.0</version>
</dependency>
<dependency>
<groupId>org.apache.arrow.adbc</groupId>
<artifactId>adbc-core</artifactId>
<version>0.21.0</version>
<version>0.22.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.13.1</version>
<version>2.13.2</version>
</dependency>
<dependency>
<groupId>com.github.rholder</groupId>
Expand All @@ -61,7 +61,7 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.130.Final</version>
<version>4.2.12.Final</version>
</dependency>
Comment on lines 61 to 65

Copilot AI Mar 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The direct dependency on io.netty:netty-all at 4.2.x is likely to override the Netty version that Apache Arrow Flight/gRPC bring in and can cause runtime classpath conflicts (e.g., NoSuchMethodError) or unvalidated behavior; gRPC’s commonly supported Netty line is 4.1.x. Consider either (1) removing the explicit netty-all dependency and letting Arrow/gRPC manage Netty, or (2) pinning Netty to the same 4.1.x version used by your gRPC/Arrow stack via dependencyManagement, or (3) switching to shaded gRPC Netty artifacts to avoid Netty version coupling.

Copilot uses AI. Check for mistakes.
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -87,7 +87,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.4</version>
<version>3.5.5</version>
<configuration>
<!-- @{argLine} is set by JaCoCo's prepare-agent goal -->
<argLine>@{argLine} --add-opens=java.base/java.nio=ALL-UNNAMED</argLine>
Expand All @@ -96,7 +96,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down Expand Up @@ -141,7 +141,7 @@
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.9.0</version>
<version>0.10.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
Expand All @@ -153,7 +153,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.9.3.0</version>
<version>4.9.8.2</version>
<configuration>
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
</configuration>
Expand All @@ -162,7 +162,7 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>12.1.1</version>
<version>12.2.0</version>
<configuration>
<failBuildOnCVSS>7</failBuildOnCVSS>
</configuration>
Expand All @@ -171,7 +171,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.13</version>
<version>0.8.14</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand All @@ -192,7 +192,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.2</version>
<executions>
<execution>
<id>enforce</id>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/spice/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}
Loading