-
-
Notifications
You must be signed in to change notification settings - Fork 772
don't use immutable=1, only mode=ro #1870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Relevant sqlite forum thread: https://www.sqlite.org/forum/forumpost/02f7bda329f41e30451472421cf9ce7f715b768ce3db02797db1768e47950d48 |
Codecov ReportBase: 92.55% // Head: 92.55% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #1870 +/- ##
=======================================
Coverage 92.55% 92.55%
=======================================
Files 35 35
Lines 4432 4432
=======================================
Hits 4102 4102
Misses 330 330
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
as far as i can tell, this is where the "immutable" argument is used in sqlite: pPager->noLock = sqlite3_uri_boolean(pPager->zFilename, "nolock", 0);
if( (iDc & SQLITE_IOCAP_IMMUTABLE)!=0
|| sqlite3_uri_boolean(pPager->zFilename, "immutable", 0) ){
vfsFlags |= SQLITE_OPEN_READONLY;
goto act_like_temp_file;
} so it does set the read only flag, but then has a goto. |
Just saw your comment here: #1836 (comment)
I don't understand this. My mental model of how Docker works is that the image itself is created using Are you saying that I can build a container, but then when I run it and it does |
Saw your comment here too: #1480 (comment)
So maybe we need a special case for containers that are intended to be run using Docker - the ones produced by Maybe a I should run some benchmarks to figure out if |
Somehow, I don't understand how that happens. it kind of feels like a bug in sqlite, but i can't quite follow the sqlite code. |
Hello! Resurrecting this issue since we're running into something similar with data.catalyst.coop as our database files have ballooned up to several GB. Our Cloud Run revisions now require huge amounts of RAM to start up without receiving a SIGBUS. I'd love to see this fix merged in. It sounds like we want to make the immutable/read-only mode decision more flexible before doing so, so that we can use |
Opening db files in immutable mode sometimes leads to the file being mutated, which causes duplication in the docker image layers: see #1836, #1480
That this happens in "immutable" mode is surprising, because the sqlite docs say that setting this should open the database as read only.
https://www.sqlite.org/c3ref/open.html
Perhaps this is a bug in sqlite?
📚 Documentation preview 📚: https://datasette--1870.org.readthedocs.build/en/1870/