{"action":"created","issue":{"url":"https://api.github.com/repos/minetest/minetest/issues/4420","repository_url":"https://api.github.com/repos/minetest/minetest","labels_url":"https://api.github.com/repos/minetest/minetest/issues/4420/labels{/name}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/4420/comments","events_url":"https://api.github.com/repos/minetest/minetest/issues/4420/events","html_url":"https://github.com/minetest/minetest/pull/4420","id":169813996,"number":4420,"title":"Sqlite3 database concurrent use & possible speed improvement","user":{"login":"Rogier-5","id":6202053,"avatar_url":"https://avatars.githubusercontent.com/u/6202053?v=3","gravatar_id":"","url":"https://api.github.com/users/Rogier-5","html_url":"https://github.com/Rogier-5","followers_url":"https://api.github.com/users/Rogier-5/followers","following_url":"https://api.github.com/users/Rogier-5/following{/other_user}","gists_url":"https://api.github.com/users/Rogier-5/gists{/gist_id}","starred_url":"https://api.github.com/users/Rogier-5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rogier-5/subscriptions","organizations_url":"https://api.github.com/users/Rogier-5/orgs","repos_url":"https://api.github.com/users/Rogier-5/repos","events_url":"https://api.github.com/users/Rogier-5/events{/privacy}","received_events_url":"https://api.github.com/users/Rogier-5/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/minetest/minetest/labels/@%20Server%20/%20Client%20/%20Env.","name":"@ Server / Client / Env.","color":"009800"},{"url":"https://api.github.com/repos/minetest/minetest/labels/Performance","name":"Performance","color":"ffff00"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-08-07T20:15:34Z","updated_at":"2016-10-10T07:27:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/minetest/minetest/pulls/4420","html_url":"https://github.com/minetest/minetest/pull/4420","diff_url":"https://github.com/minetest/minetest/pull/4420.diff","patch_url":"https://github.com/minetest/minetest/pull/4420.patch"},"body":"I have created these patches to improve concurrent use of minetest with an external application reading the database. E.g. minetestmapper. One patch can also improve the speed or reduce the risk of corruption.\r\n\r\nMajor changes:\r\n- Add support for Sqlite3 WAL mode. See https://www.sqlite.org/wal.html.\r\n- Increase abort delay if an external application is accessing (reading) the database.\r\n\r\nAs there are tradeoffs to enabling WAL mode by default, I put it in a separate patch, which can be merged independently, or not.\r\n\r\nThe possible speed improvement comes from the fact that WAL mode is safer, thus allowing `sqlite_synchronous` to be set to `normal` (1) instead of `full` (2) without increasing the risk of a corrupt database after an OS crash or power failure. [Quote](https://www.sqlite.org/pragma.html#pragma_synchronous):\r\n\r\n > With synchronous=FULL in WAL mode, an additional sync operation of the WAL file happens after each transaction commit. The extra WAL sync following each transaction help ensure that transactions are durable across a power loss, but they do not aid in preserving consistency. If durability is not a concern, then synchronous=NORMAL is normally all one needs in WAL mode.\r\n\r\nI.e. in WAL mode with `synchronous = normal`, the risk of minor data loss is a little bit higher, but the loss will still not be significant, and an OS crash results in loss of unsaved blocks anyway. Losing a few more because some OS buffers of the WAL file were not completely written out to disk will not be a significant problem to most server administrators if the benefit is better performance."},"comment":{"url":"https://api.github.com/repos/minetest/minetest/issues/comments/252550865","html_url":"https://github.com/minetest/minetest/pull/4420#issuecomment-252550865","issue_url":"https://api.github.com/repos/minetest/minetest/issues/4420","id":252550865,"user":{"login":"Rogier-5","id":6202053,"avatar_url":"https://avatars.githubusercontent.com/u/6202053?v=3","gravatar_id":"","url":"https://api.github.com/users/Rogier-5","html_url":"https://github.com/Rogier-5","followers_url":"https://api.github.com/users/Rogier-5/followers","following_url":"https://api.github.com/users/Rogier-5/following{/other_user}","gists_url":"https://api.github.com/users/Rogier-5/gists{/gist_id}","starred_url":"https://api.github.com/users/Rogier-5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rogier-5/subscriptions","organizations_url":"https://api.github.com/users/Rogier-5/orgs","repos_url":"https://api.github.com/users/Rogier-5/repos","events_url":"https://api.github.com/users/Rogier-5/events{/privacy}","received_events_url":"https://api.github.com/users/Rogier-5/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T07:27:39Z","updated_at":"2016-10-10T07:27:39Z","body":"@Megaf: You mean you spotted one ?"}}
{"actor":{"display_login":"Rogier-5"}}