{"html_url": "https://github.com/simonw/datasette/issues/1836#issuecomment-1272344884", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1836", "id": 1272344884, "node_id": "IC_kwDOBm6k_c5L1nE0", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-08T15:41:28Z", "updated_at": "2022-10-08T15:41:28Z", "author_association": "OWNER", "body": "Lets switch to `mode=ro` when the `inspect` command runs, we can use this issue for that.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1400374908, "label": "docker image is duplicating db files somehow"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1836#issuecomment-1271006020", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1836", "id": 1271006020, "node_id": "IC_kwDOBm6k_c5LwgNE", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-07T01:54:07Z", "updated_at": "2022-10-07T01:54:07Z", "author_association": "OWNER", "body": "Just overlapped with your comment here: https://github.com/simonw/datasette/issues/1836#issuecomment-1271003212 - which notes that opening with `?immutable=1` DOES seem to cause the file to be duplicated!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1400374908, "label": "docker image is duplicating db files somehow"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1836#issuecomment-1271004167", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1836", "id": 1271004167, "node_id": "IC_kwDOBm6k_c5LwfwH", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-07T01:53:05Z", "updated_at": "2022-10-07T01:53:05Z", "author_association": "OWNER", "body": "Oh this is interesting!\r\n\r\nIs your hunch here that running this line is causing the file to be stored as a second layer?\r\n\r\nhttps://github.com/simonw/datasette/blob/5aa359b86907d11b3ee601510775a85a90224da8/datasette/utils/__init__.py#L399\r\n\r\nI guess it's possible that running a non-read-only query against the database causes one or two bytes to be changed (maybe a transaction ID or similar?)\r\n\r\nModifying the `inspect` command to use `?mode=ro` seems sensible to me. Except.... it should already be opening those files in immutable mode according to this line: https://github.com/simonw/datasette/blob/eff112498ecc499323c26612d707908831446d25/datasette/cli.py#L172-L173\r\n\r\nHere's what opening as a `immutables` does:\r\n\r\nhttps://github.com/simonw/datasette/blob/eff112498ecc499323c26612d707908831446d25/datasette/app.py#L258-L260\r\n\r\nhttps://github.com/simonw/datasette/blob/eff112498ecc499323c26612d707908831446d25/datasette/database.py#L98\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1400374908, "label": "docker image is duplicating db files somehow"}, "performed_via_github_app": null}