duckdb / duckdb/duckdb-java

FATAL Error: Database invalidated. Failed to create checkpoint as .wal file does not exist

未关闭
#331 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
127
派生
80
平均合并
13 小时 49 分钟
30 天内合并 PR
48

描述

Java 21, Duckdb 1.2.2.0, OS: Linux Redhat 10

In my Java application, I am opening multiple connections from different threads to Duckdb in persistent mode. In the start of the application, I create a main connection, and now any subsequent connection is created using `DuckDBConnection.duplicate`.
DuckDB file is only accessed from this process.

My connection is created with property `jdbc_stream_results` set to true.

One of my update query failed with error:
```
java.sql.SQLException: FATAL Error: Failed: database has been invalidated because of a previous fatal error. The database must be restarted prior to being used again.
Original error: "Failed to create checkpoint because of error: Could not remove file "/home/ec2-user/duckdb/./duckdb.db.wal": No such file or directory"
```

Scenario:
1. DuckDb is being queried by a select query on a different table parallely.
2. Update/INSERT queries are coming. They are processed in different threads. To run a query, I create new connection (using duplicate) and run the query.

My duckdb.db file is around 160 GB.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先,使用启用 jdbc_stream_results 的 DuckDBConnection.duplicate 重现 concurrent select 和 update/INSERT 场景,重点关注涉及 duckdb.db.wal 的 checkpoint failure。检查 Java JDBC connection 在 duplicate connections 周围的行为,并确定 database 在 concurrent access 期间是否仍然有效且不会出现 missing-WAL-file error。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, linux, sql
领域
backend, databases
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。