duckdb / duckdb/duckdb-java

Failure to auto load httpfs extension after upgrading to 1.5.*

Offen
#679 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
127
Forks
80
Ø Merge
13 Std. 49 Min.
Gemergte PRs (30 T.)
48

Beschreibung

After updating to 1.5.0.0 (and newer) versions, I'm seeing the following error:

```
org.jooq.exception.DataAccessException: SQL [CREATE SECRET s3_credentials (
TYPE S3,
PROVIDER config,
KEY_ID '....',
SECRET '....',
REGION 'us-west-2'
);
]; Extension Autoloading Error: An error occurred while trying to automatically install the required extension 'httpfs':
Can't find the home directory at ''
Specify a home directory using the SET home_directory='/path/to/dir' option.
```

This happens when I run my code in AWS Lambda ARM64, but not when running on my machine.

Version 1.4.4.0 and earlier work fine.

Snippet that triggers the issue (when running on AWS Lambda).
```java
final var conn = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:");

final var config = new DefaultConfiguration().set(conn).set(SQLDialect.DUCKDB);
final var context = DSL.using(config);

context.execute("""
SET home_directory='/tmp/.duckdb';
SET secret_directory='/tmp/.duckdb/sec';
SET extension_directory='/tmp/.duckdb/ext';
SET temp_directory='/tmp';
SET TimeZone='UTC';
""");

context.execute("""
CREATE SECRET s3_credentials (
TYPE S3,
PROVIDER config,
KEY_ID ?,
SECRET ?,
REGION ?
);
""", DSL.inline(accessKey), DSL.inline(secretKey), DSL.inline(region));
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit dem Java-Snippet, das die DuckDB JDBC connection und die SET home_directory, secret_directory, extension_directory und temp_directory-Anweisungen verwendet. Reproduziere es in AWS Lambda ARM64 mit DuckDB 1.5.* und vergleiche es mit 1.4.4.0; abgeschlossen ist die Aufgabe, wenn die httpfs extension automatisch geladen wird und CREATE SECRET ohne den home-directory-Fehler erfolgreich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, java, sql
Bereich
backend, cloud, databases
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.