{"action":"created","issue":{"url":"https://api.github.com/repos/dgraph-io/badger/issues/432","repository_url":"https://api.github.com/repos/dgraph-io/badger","labels_url":"https://api.github.com/repos/dgraph-io/badger/issues/432/labels{/name}","comments_url":"https://api.github.com/repos/dgraph-io/badger/issues/432/comments","events_url":"https://api.github.com/repos/dgraph-io/badger/issues/432/events","html_url":"https://github.com/dgraph-io/badger/pull/432","id":302924213,"number":432,"title":"Non-locking, read-only opens","user":{"login":"allenluce","id":4258048,"avatar_url":"https://avatars1.githubusercontent.com/u/4258048?v=4","gravatar_id":"","url":"https://api.github.com/users/allenluce","html_url":"https://github.com/allenluce","followers_url":"https://api.github.com/users/allenluce/followers","following_url":"https://api.github.com/users/allenluce/following{/other_user}","gists_url":"https://api.github.com/users/allenluce/gists{/gist_id}","starred_url":"https://api.github.com/users/allenluce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenluce/subscriptions","organizations_url":"https://api.github.com/users/allenluce/orgs","repos_url":"https://api.github.com/users/allenluce/repos","events_url":"https://api.github.com/users/allenluce/events{/privacy}","received_events_url":"https://api.github.com/users/allenluce/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-07T00:51:12Z","updated_at":"2018-03-07T00:51:19Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/dgraph-io/badger/pulls/432","html_url":"https://github.com/dgraph-io/badger/pull/432","diff_url":"https://github.com/dgraph-io/badger/pull/432.diff","patch_url":"https://github.com/dgraph-io/badger/pull/432.patch"},"body":"This introduces a read-only option on the DB struct. The main effect is to force all transactions to be read-only. It also skips anything that might write to disk.\r\n\r\nIt will put a shared lock on the directory when it's opened read-only. This will allow other read-only opens but will deny read-write opens until all readers have closed. If the database is already open read-write and an attempt is made to open it again (read-only or read-write), an error occurs.\r\n\r\nIt also:\r\n\r\n - Fails if the manifest doesn't exist on read-only open\r\n - Does not attempt to truncate the manifest\r\n - Skips compactors and memtable\r\n - All vlogs are opened read-only\r\n\r\nThis change assumes that there will be no need to write anything during read-only operations, no need to do garbage collection or compaction or revising vlogs or anything. I'm not sure that this is a 100% valid assumption.\r\n\r\nThis addresses #372\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/dgraph-io/badger/432)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/dgraph-io/badger/issues/comments/370983143","html_url":"https://github.com/dgraph-io/badger/pull/432#issuecomment-370983143","issue_url":"https://api.github.com/repos/dgraph-io/badger/issues/432","id":370983143,"user":{"login":"CLAassistant","id":11571300,"avatar_url":"https://avatars1.githubusercontent.com/u/11571300?v=4","gravatar_id":"","url":"https://api.github.com/users/CLAassistant","html_url":"https://github.com/CLAassistant","followers_url":"https://api.github.com/users/CLAassistant/followers","following_url":"https://api.github.com/users/CLAassistant/following{/other_user}","gists_url":"https://api.github.com/users/CLAassistant/gists{/gist_id}","starred_url":"https://api.github.com/users/CLAassistant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CLAassistant/subscriptions","organizations_url":"https://api.github.com/users/CLAassistant/orgs","repos_url":"https://api.github.com/users/CLAassistant/repos","events_url":"https://api.github.com/users/CLAassistant/events{/privacy}","received_events_url":"https://api.github.com/users/CLAassistant/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T00:51:19Z","updated_at":"2018-03-07T00:51:19Z","author_association":"NONE","body":"[![CLA assistant check](https://cla-assistant.io/pull/badge/not_signed)](https://cla-assistant.io/dgraph-io/badger?pullRequest=432) <br/>Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla-assistant.io/dgraph-io/badger?pullRequest=432) before we can accept your contribution.<br/><hr/>**Allen Luce** seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please [add the email address used for this commit to your account](https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user).<br/><sub>You have signed the CLA already but the status is still pending? Let us [recheck](https://cla-assistant.io/check/dgraph-io/badger?pullRequest=432) it.</sub>"}}
{"actor":{"display_login":"CLAassistant"}}