Connection caching bug? #113
Unanswered
rkennedy-argus
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have code that monitors a DuckDB file (via fsnotify) for updates. When it detects that the DuckDB file has been replaced, it opens a new connection, atomically swaps it for the original, and then closes the original (allowing me zero downtime upgrades). This code has been using marcboeker's go-duckdb v1.8.5 (DuckDB v1.1.3) and I'm now updating it to duckdb/duckdb-go v2.5.5 (DuckDB 1.4.4). In making this update, our file watching tests are now failing.
I believe this is due to DuckDB path-based connection caching, but I'm uncertain if that behavior changed in switching from marcboeker/go-duckdb to duckdb/duckdb-go or if it's in one of the DuckDB upgrades that also comes with that switch. I'm also unsure if/how I can disable connection caching in duckdb/duckdb-go.
I've posted a gist (https://gist.github.com/rkennedy-argus/8d5c86045a27b61d3e3ecefdad1ad3dc) with code to reproduce this. I'm happy to open an issue if this isn't expected behavior. Otherwise, I'm open to suggestions relating to disabling the connection cache. In looking through the release notes between DuckDB 1.1.3 and 1.4.4, I noticed duckdb/duckdb#19841, which may or may not be related to why I'm seeing this change in behavior when my only code changes are upgrading from marcboeker/go-duckdb to duckdb/duckdb-go. I haven't found a way to disable connection caching, however.
Beta Was this translation helpful? Give feedback.
All reactions