{"action":"created","comment":{"url":"https://api.github.com/repos/xapi-project/xen-api/pulls/comments/169133740","pull_request_review_id":97611553,"id":169133740,"diff_hunk":"@@ -72,7 +72,8 @@ let light_fuse_and_dont_restart ?(fuse_length = !Xapi_globs.fuse_time) () =\n                log_and_ignore_exn Xapi_stats.stop;\n                log_and_ignore_exn Rrdd.backup_rrds;\n                Thread.delay fuse_length;\n-               Db_cache_impl.flush_and_exit (Db_connections.preferred_write_db ()) 0) ());\n+               let dbconn = Xapi_stdext_monadic.Opt.unbox (Db_connections.preferred_write_db) in\n+               Db_cache_impl.flush_and_exit dbconn 0) ());","path":"ocaml/xapi/xapi_fuse.ml","position":15,"original_position":15,"commit_id":"7bd3bbb3c41a65a926ffca60e62cf4166ea76b51","original_commit_id":"5d71ac09df0027f3469f69810c1d8a6789c4f6d7","user":{"login":"mcintyre94","id":1711350,"avatar_url":"https://avatars1.githubusercontent.com/u/1711350?v=4","gravatar_id":"","url":"https://api.github.com/users/mcintyre94","html_url":"https://github.com/mcintyre94","followers_url":"https://api.github.com/users/mcintyre94/followers","following_url":"https://api.github.com/users/mcintyre94/following{/other_user}","gists_url":"https://api.github.com/users/mcintyre94/gists{/gist_id}","starred_url":"https://api.github.com/users/mcintyre94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcintyre94/subscriptions","organizations_url":"https://api.github.com/users/mcintyre94/orgs","repos_url":"https://api.github.com/users/mcintyre94/repos","events_url":"https://api.github.com/users/mcintyre94/events{/privacy}","received_events_url":"https://api.github.com/users/mcintyre94/received_events","type":"User","site_admin":false},"body":"I figured since the whole thing is inside a try and `Db_connections.preferred_write_db ()` is already raising on `List.Hd` if there isn't one, this keeps the behaviour the same.","created_at":"2018-02-19T17:12:07Z","updated_at":"2018-02-19T17:12:07Z","html_url":"https://github.com/xapi-project/xen-api/pull/3459#discussion_r169133740","pull_request_url":"https://api.github.com/repos/xapi-project/xen-api/pulls/3459","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/xapi-project/xen-api/pulls/comments/169133740"},"html":{"href":"https://github.com/xapi-project/xen-api/pull/3459#discussion_r169133740"},"pull_request":{"href":"https://api.github.com/repos/xapi-project/xen-api/pulls/3459"}},"in_reply_to_id":169133475},"pull_request":{"url":"https://api.github.com/repos/xapi-project/xen-api/pulls/3459","id":170011604,"html_url":"https://github.com/xapi-project/xen-api/pull/3459","diff_url":"https://github.com/xapi-project/xen-api/pull/3459.diff","patch_url":"https://github.com/xapi-project/xen-api/pull/3459.patch","issue_url":"https://api.github.com/repos/xapi-project/xen-api/issues/3459","number":3459,"state":"open","locked":false,"title":"[Cp 26826] fsync XAPI master DB on major lifecycle operations","user":{"login":"mcintyre94","id":1711350,"avatar_url":"https://avatars1.githubusercontent.com/u/1711350?v=4","gravatar_id":"","url":"https://api.github.com/users/mcintyre94","html_url":"https://github.com/mcintyre94","followers_url":"https://api.github.com/users/mcintyre94/followers","following_url":"https://api.github.com/users/mcintyre94/following{/other_user}","gists_url":"https://api.github.com/users/mcintyre94/gists{/gist_id}","starred_url":"https://api.github.com/users/mcintyre94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcintyre94/subscriptions","organizations_url":"https://api.github.com/users/mcintyre94/orgs","repos_url":"https://api.github.com/users/mcintyre94/repos","events_url":"https://api.github.com/users/mcintyre94/events{/privacy}","received_events_url":"https://api.github.com/users/mcintyre94/received_events","type":"User","site_admin":false},"body":"Best reviewed commit-by-commit. :)\r\n\r\n- Adds a new mutable field `fsync_enabled` to `db_connection`\r\n- Adds an `fsync` flag to `flush` DB functions and fsync the file descriptor before closing if it's set\r\n- Refactor `preferred_write_db` because it used List.Hd which caused tests to fail after a later commit (and had a 9 year old 'FIXME' :) )\r\n- Set `fsync enabled` in xapi startup and when clustering is enabled/disabled\r\n- Add fsync on pool join when clustering is enabled","created_at":"2018-02-19T16:58:50Z","updated_at":"2018-02-19T17:12:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6547d126325db174b987e0be90bab5acf0cb90b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/xapi-project/xen-api/pulls/3459/commits","review_comments_url":"https://api.github.com/repos/xapi-project/xen-api/pulls/3459/comments","review_comment_url":"https://api.github.com/repos/xapi-project/xen-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xapi-project/xen-api/issues/3459/comments","statuses_url":"https://api.github.com/repos/xapi-project/xen-api/statuses/7bd3bbb3c41a65a926ffca60e62cf4166ea76b51","head":{"label":"mcintyre94:CP-26826-cherrypick","ref":"CP-26826-cherrypick","sha":"7bd3bbb3c41a65a926ffca60e62cf4166ea76b51","user":{"login":"mcintyre94","id":1711350,"avatar_url":"https://avatars1.githubusercontent.com/u/1711350?v=4","gravatar_id":"","url":"https://api.github.com/users/mcintyre94","html_url":"https://github.com/mcintyre94","followers_url":"https://api.github.com/users/mcintyre94/followers","following_url":"https://api.github.com/users/mcintyre94/following{/other_user}","gists_url":"https://api.github.com/users/mcintyre94/gists{/gist_id}","starred_url":"https://api.github.com/users/mcintyre94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcintyre94/subscriptions","organizations_url":"https://api.github.com/users/mcintyre94/orgs","repos_url":"https://api.github.com/users/mcintyre94/repos","events_url":"https://api.github.com/users/mcintyre94/events{/privacy}","received_events_url":"https://api.github.com/users/mcintyre94/received_events","type":"User","site_admin":false},"repo":{"id":82932152,"name":"xen-api","full_name":"mcintyre94/xen-api","owner":{"login":"mcintyre94","id":1711350,"avatar_url":"https://avatars1.githubusercontent.com/u/1711350?v=4","gravatar_id":"","url":"https://api.github.com/users/mcintyre94","html_url":"https://github.com/mcintyre94","followers_url":"https://api.github.com/users/mcintyre94/followers","following_url":"https://api.github.com/users/mcintyre94/following{/other_user}","gists_url":"https://api.github.com/users/mcintyre94/gists{/gist_id}","starred_url":"https://api.github.com/users/mcintyre94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcintyre94/subscriptions","organizations_url":"https://api.github.com/users/mcintyre94/orgs","repos_url":"https://api.github.com/users/mcintyre94/repos","events_url":"https://api.github.com/users/mcintyre94/events{/privacy}","received_events_url":"https://api.github.com/users/mcintyre94/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcintyre94/xen-api","description":"The Xapi Project's XenAPI Server","fork":true,"url":"https://api.github.com/repos/mcintyre94/xen-api","forks_url":"https://api.github.com/repos/mcintyre94/xen-api/forks","keys_url":"https://api.github.com/repos/mcintyre94/xen-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcintyre94/xen-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcintyre94/xen-api/teams","hooks_url":"https://api.github.com/repos/mcintyre94/xen-api/hooks","issue_events_url":"https://api.github.com/repos/mcintyre94/xen-api/issues/events{/number}","events_url":"https://api.github.com/repos/mcintyre94/xen-api/events","assignees_url":"https://api.github.com/repos/mcintyre94/xen-api/assignees{/user}","branches_url":"https://api.github.com/repos/mcintyre94/xen-api/branches{/branch}","tags_url":"https://api.github.com/repos/mcintyre94/xen-api/tags","blobs_url":"https://api.github.com/repos/mcintyre94/xen-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcintyre94/xen-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcintyre94/xen-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcintyre94/xen-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcintyre94/xen-api/statuses/{sha}","languages_url":"https://api.github.com/repos/mcintyre94/xen-api/languages","stargazers_url":"https://api.github.com/repos/mcintyre94/xen-api/stargazers","contributors_url":"https://api.github.com/repos/mcintyre94/xen-api/contributors","subscribers_url":"https://api.github.com/repos/mcintyre94/xen-api/subscribers","subscription_url":"https://api.github.com/repos/mcintyre94/xen-api/subscription","commits_url":"https://api.github.com/repos/mcintyre94/xen-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcintyre94/xen-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcintyre94/xen-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcintyre94/xen-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcintyre94/xen-api/contents/{+path}","compare_url":"https://api.github.com/repos/mcintyre94/xen-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcintyre94/xen-api/merges","archive_url":"https://api.github.com/repos/mcintyre94/xen-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcintyre94/xen-api/downloads","issues_url":"https://api.github.com/repos/mcintyre94/xen-api/issues{/number}","pulls_url":"https://api.github.com/repos/mcintyre94/xen-api/pulls{/number}","milestones_url":"https://api.github.com/repos/mcintyre94/xen-api/milestones{/number}","notifications_url":"https://api.github.com/repos/mcintyre94/xen-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcintyre94/xen-api/labels{/name}","releases_url":"https://api.github.com/repos/mcintyre94/xen-api/releases{/id}","deployments_url":"https://api.github.com/repos/mcintyre94/xen-api/deployments","created_at":"2017-02-23T13:55:58Z","updated_at":"2017-02-23T13:56:03Z","pushed_at":"2018-02-19T16:53:14Z","git_url":"git://github.com/mcintyre94/xen-api.git","ssh_url":"git@github.com:mcintyre94/xen-api.git","clone_url":"https://github.com/mcintyre94/xen-api.git","svn_url":"https://github.com/mcintyre94/xen-api","homepage":"http://xenproject.org/developers/teams/xapi.html","size":30362,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xapi-project:feature/REQ477/master","ref":"feature/REQ477/master","sha":"b027e2b92afb91b27ec7e797cf47951aa6dc9df4","user":{"login":"xapi-project","id":317268,"avatar_url":"https://avatars3.githubusercontent.com/u/317268?v=4","gravatar_id":"","url":"https://api.github.com/users/xapi-project","html_url":"https://github.com/xapi-project","followers_url":"https://api.github.com/users/xapi-project/followers","following_url":"https://api.github.com/users/xapi-project/following{/other_user}","gists_url":"https://api.github.com/users/xapi-project/gists{/gist_id}","starred_url":"https://api.github.com/users/xapi-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xapi-project/subscriptions","organizations_url":"https://api.github.com/users/xapi-project/orgs","repos_url":"https://api.github.com/users/xapi-project/repos","events_url":"https://api.github.com/users/xapi-project/events{/privacy}","received_events_url":"https://api.github.com/users/xapi-project/received_events","type":"Organization","site_admin":false},"repo":{"id":960233,"name":"xen-api","full_name":"xapi-project/xen-api","owner":{"login":"xapi-project","id":317268,"avatar_url":"https://avatars3.githubusercontent.com/u/317268?v=4","gravatar_id":"","url":"https://api.github.com/users/xapi-project","html_url":"https://github.com/xapi-project","followers_url":"https://api.github.com/users/xapi-project/followers","following_url":"https://api.github.com/users/xapi-project/following{/other_user}","gists_url":"https://api.github.com/users/xapi-project/gists{/gist_id}","starred_url":"https://api.github.com/users/xapi-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xapi-project/subscriptions","organizations_url":"https://api.github.com/users/xapi-project/orgs","repos_url":"https://api.github.com/users/xapi-project/repos","events_url":"https://api.github.com/users/xapi-project/events{/privacy}","received_events_url":"https://api.github.com/users/xapi-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xapi-project/xen-api","description":"The Xapi Project's XenAPI Server","fork":false,"url":"https://api.github.com/repos/xapi-project/xen-api","forks_url":"https://api.github.com/repos/xapi-project/xen-api/forks","keys_url":"https://api.github.com/repos/xapi-project/xen-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xapi-project/xen-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xapi-project/xen-api/teams","hooks_url":"https://api.github.com/repos/xapi-project/xen-api/hooks","issue_events_url":"https://api.github.com/repos/xapi-project/xen-api/issues/events{/number}","events_url":"https://api.github.com/repos/xapi-project/xen-api/events","assignees_url":"https://api.github.com/repos/xapi-project/xen-api/assignees{/user}","branches_url":"https://api.github.com/repos/xapi-project/xen-api/branches{/branch}","tags_url":"https://api.github.com/repos/xapi-project/xen-api/tags","blobs_url":"https://api.github.com/repos/xapi-project/xen-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xapi-project/xen-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xapi-project/xen-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/xapi-project/xen-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xapi-project/xen-api/statuses/{sha}","languages_url":"https://api.github.com/repos/xapi-project/xen-api/languages","stargazers_url":"https://api.github.com/repos/xapi-project/xen-api/stargazers","contributors_url":"https://api.github.com/repos/xapi-project/xen-api/contributors","subscribers_url":"https://api.github.com/repos/xapi-project/xen-api/subscribers","subscription_url":"https://api.github.com/repos/xapi-project/xen-api/subscription","commits_url":"https://api.github.com/repos/xapi-project/xen-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/xapi-project/xen-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/xapi-project/xen-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/xapi-project/xen-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/xapi-project/xen-api/contents/{+path}","compare_url":"https://api.github.com/repos/xapi-project/xen-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xapi-project/xen-api/merges","archive_url":"https://api.github.com/repos/xapi-project/xen-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xapi-project/xen-api/downloads","issues_url":"https://api.github.com/repos/xapi-project/xen-api/issues{/number}","pulls_url":"https://api.github.com/repos/xapi-project/xen-api/pulls{/number}","milestones_url":"https://api.github.com/repos/xapi-project/xen-api/milestones{/number}","notifications_url":"https://api.github.com/repos/xapi-project/xen-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xapi-project/xen-api/labels{/name}","releases_url":"https://api.github.com/repos/xapi-project/xen-api/releases{/id}","deployments_url":"https://api.github.com/repos/xapi-project/xen-api/deployments","created_at":"2010-10-04T10:52:57Z","updated_at":"2018-02-01T17:09:16Z","pushed_at":"2018-02-19T16:58:51Z","git_url":"git://github.com/xapi-project/xen-api.git","ssh_url":"git@github.com:xapi-project/xen-api.git","clone_url":"https://github.com/xapi-project/xen-api.git","svn_url":"https://github.com/xapi-project/xen-api","homepage":"http://xenproject.org/developers/teams/xapi.html","size":31095,"stargazers_count":253,"watchers_count":253,"language":"OCaml","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":201,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":201,"open_issues":21,"watchers":253,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xapi-project/xen-api/pulls/3459"},"html":{"href":"https://github.com/xapi-project/xen-api/pull/3459"},"issue":{"href":"https://api.github.com/repos/xapi-project/xen-api/issues/3459"},"comments":{"href":"https://api.github.com/repos/xapi-project/xen-api/issues/3459/comments"},"review_comments":{"href":"https://api.github.com/repos/xapi-project/xen-api/pulls/3459/comments"},"review_comment":{"href":"https://api.github.com/repos/xapi-project/xen-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xapi-project/xen-api/pulls/3459/commits"},"statuses":{"href":"https://api.github.com/repos/xapi-project/xen-api/statuses/7bd3bbb3c41a65a926ffca60e62cf4166ea76b51"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mcintyre94"}}