Comments (4)
Thanks for opening this bug report. Can you clarify why you believe this is a bug in diesel, especially as the sqlite documentation says "usually", which implies that there are valid cases where this is not the case and given that diesel explicitly calls sqlite3_close
for each opened database object:
diesel/diesel/src/sqlite/connection/raw.rs
Line 248 in 6ef23bd
from diesel.
Hi @weiznich , I don't have all the clue that it's a diesel bug, it's just an abnormality that I observed using diesel.
Per the sqlite documentation, the wal files are not deleted if:
- the last process to have the database open exits without cleanly shutting down the database connection - which should not be the case, as my program is the only process that opens the database, and I guess calling
sqlite3_close
is sufficient to "cleanly shut down the database connection"? - or if the SQLITE_FCNTL_PERSIST_WAL file control is used - this one I'm not sure, could there be a place that implicitly sets this flag?
The documentation did not list a third reason, but since the docs are as comprehensive as they can be, I believe it has covered most of the cases. Also for me it's tolerable if the wal files are not deleted occassionally, but apparently in our use cases they are never deleted, which I think should be addressed as a bug.
from diesel.
This seems to be related to the fact that you use a read only connection.
https://stackoverflow.com/questions/33177784/sqlite3-wal-shm-files-not-deleted#33184948
from diesel.
@weiznich Thanks! That indeed seems to be the problem. A weird behavior in the sqlite implementation but now kind of make sense to me: the -wal file is required to open a db in WAL mode. If sqlite failed to generate the file, it can't even open the db.
(per sqlite docs:)
If the WAL and WAL-index files are missing, then a process that lacks permission to create and initialize those files will not be able to open the database.
from diesel.
Related Issues (20)
- Windows CI is failing to install postgres HOT 2
- Can not use .eq(Decimal_field + xxx) HOT 4
- Execute single-statement migrations without batch_execute HOT 6
- Linking error for diesel_cli in Alpine despite libraries being installed HOT 5
- Option field check in diesel_derives in incomplete
- oid caching leads to broken queries after schema changes HOT 2
- The diesel 2.1.5 version cannot close the tls connection HOT 7
- Diesel-Schema not supporting Postgres-SCHEMA HOT 1
- `skip_insertion` results in a compiler error HOT 4
- table with more than one primary_key can not use on_conflict().do_update() HOT 1
- Make empty changeset updates using `.optional()` , either ignore or bypass errors `QueryBuilderError` s.
- Rust-analyzer fails to autocomplete Match with diesel errors (Enum) HOT 4
- Migration Not Generating Correct Schema for Custom Types HOT 3
- Investigate new nightly warning about a soundness hole in the type system
- `diesel print-schema > foo.rs` fails without error message if database url not set HOT 1
- Using diesel CLI with `exclude_custom_type_definitions` has unexpected outcomes HOT 1
- [2.2.0 regression] mysqlclient-sys does not provide bundled bindings for libmysqlclient 21. Consider using the `buildtime_bindgen` feature or contribute bindings to the crate HOT 13
- `belonging_to().inner_join()` and `.select()` with two-item tuple causes build error on sqlite backend HOT 1
- derive(Queryable) doesn't work with a field of `Field` type HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diesel.