{"action":"closed","number":576,"pull_request":{"url":"https://api.github.com/repos/mapbox/node-sqlite3/pulls/576","id":53741453,"node_id":"MDExOlB1bGxSZXF1ZXN0NTM3NDE0NTM=","html_url":"https://github.com/mapbox/node-sqlite3/pull/576","diff_url":"https://github.com/mapbox/node-sqlite3/pull/576.diff","patch_url":"https://github.com/mapbox/node-sqlite3/pull/576.patch","issue_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/576","number":576,"state":"closed","locked":false,"title":"On Mac OS X, never fall back to waiting 1s to aquire transactions","user":{"login":"bengotow","id":1037212,"node_id":"MDQ6VXNlcjEwMzcyMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1037212?v=4","gravatar_id":"","url":"https://api.github.com/users/bengotow","html_url":"https://github.com/bengotow","followers_url":"https://api.github.com/users/bengotow/followers","following_url":"https://api.github.com/users/bengotow/following{/other_user}","gists_url":"https://api.github.com/users/bengotow/gists{/gist_id}","starred_url":"https://api.github.com/users/bengotow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengotow/subscriptions","organizations_url":"https://api.github.com/users/bengotow/orgs","repos_url":"https://api.github.com/users/bengotow/repos","events_url":"https://api.github.com/users/bengotow/events{/privacy}","received_events_url":"https://api.github.com/users/bengotow/received_events","type":"User","site_admin":false},"body":"We're building node-sqlite3 against Electron and using it in N1 (http://github.com/nylas/N1). The app opens connections to a sqlite database from several Node processes and we recently discovered that it's waiting intervals of 1000ms to aquire transactions when it encounters `SQLITE_BUSY` because `HAVE_USLEEP` is being erroneously set to false at compile time. (I'm not sure why this is the case—as far as I know, `usleep` has always been available on Mac OS X!)\n\nThis PR changes the sqlite gyp config so that `HAVE_USLEEP` is always passed in on Mac OS X. We verified that this corrects our issue in N1 by measuring the wall time it takes to open transactions and observing that it's no longer either `1ms` or `1001ms`.\n\nGiven how much compile flags impact sqlite's performance, it might be good to dig in and figure out why this is necessary, and possibly enable it on other platforms via `'cflags': ['-DHAVE_USLEEP=1']`\n","created_at":"2015-12-15T18:19:03Z","updated_at":"2018-11-26T12:39:09Z","closed_at":"2018-11-26T12:39:09Z","merged_at":null,"merge_commit_sha":"be7968581ca144e91362879bf38ca0019502532f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapbox/node-sqlite3/pulls/576/commits","review_comments_url":"https://api.github.com/repos/mapbox/node-sqlite3/pulls/576/comments","review_comment_url":"https://api.github.com/repos/mapbox/node-sqlite3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/576/comments","statuses_url":"https://api.github.com/repos/mapbox/node-sqlite3/statuses/48984d8166a909052b0f84d10d5fc7bb18130ce6","head":{"label":"bengotow:bengotow/usleep","ref":"bengotow/usleep","sha":"48984d8166a909052b0f84d10d5fc7bb18130ce6","user":{"login":"bengotow","id":1037212,"node_id":"MDQ6VXNlcjEwMzcyMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1037212?v=4","gravatar_id":"","url":"https://api.github.com/users/bengotow","html_url":"https://github.com/bengotow","followers_url":"https://api.github.com/users/bengotow/followers","following_url":"https://api.github.com/users/bengotow/following{/other_user}","gists_url":"https://api.github.com/users/bengotow/gists{/gist_id}","starred_url":"https://api.github.com/users/bengotow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengotow/subscriptions","organizations_url":"https://api.github.com/users/bengotow/orgs","repos_url":"https://api.github.com/users/bengotow/repos","events_url":"https://api.github.com/users/bengotow/events{/privacy}","received_events_url":"https://api.github.com/users/bengotow/received_events","type":"User","site_admin":false},"repo":{"id":39960583,"node_id":"MDEwOlJlcG9zaXRvcnkzOTk2MDU4Mw==","name":"node-sqlite3","full_name":"bengotow/node-sqlite3","private":false,"owner":{"login":"bengotow","id":1037212,"node_id":"MDQ6VXNlcjEwMzcyMTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1037212?v=4","gravatar_id":"","url":"https://api.github.com/users/bengotow","html_url":"https://github.com/bengotow","followers_url":"https://api.github.com/users/bengotow/followers","following_url":"https://api.github.com/users/bengotow/following{/other_user}","gists_url":"https://api.github.com/users/bengotow/gists{/gist_id}","starred_url":"https://api.github.com/users/bengotow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengotow/subscriptions","organizations_url":"https://api.github.com/users/bengotow/orgs","repos_url":"https://api.github.com/users/bengotow/repos","events_url":"https://api.github.com/users/bengotow/events{/privacy}","received_events_url":"https://api.github.com/users/bengotow/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bengotow/node-sqlite3","description":"Asynchronous, non-blocking SQLite3 bindings for Node.js","fork":true,"url":"https://api.github.com/repos/bengotow/node-sqlite3","forks_url":"https://api.github.com/repos/bengotow/node-sqlite3/forks","keys_url":"https://api.github.com/repos/bengotow/node-sqlite3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bengotow/node-sqlite3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bengotow/node-sqlite3/teams","hooks_url":"https://api.github.com/repos/bengotow/node-sqlite3/hooks","issue_events_url":"https://api.github.com/repos/bengotow/node-sqlite3/issues/events{/number}","events_url":"https://api.github.com/repos/bengotow/node-sqlite3/events","assignees_url":"https://api.github.com/repos/bengotow/node-sqlite3/assignees{/user}","branches_url":"https://api.github.com/repos/bengotow/node-sqlite3/branches{/branch}","tags_url":"https://api.github.com/repos/bengotow/node-sqlite3/tags","blobs_url":"https://api.github.com/repos/bengotow/node-sqlite3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bengotow/node-sqlite3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bengotow/node-sqlite3/git/refs{/sha}","trees_url":"https://api.github.com/repos/bengotow/node-sqlite3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bengotow/node-sqlite3/statuses/{sha}","languages_url":"https://api.github.com/repos/bengotow/node-sqlite3/languages","stargazers_url":"https://api.github.com/repos/bengotow/node-sqlite3/stargazers","contributors_url":"https://api.github.com/repos/bengotow/node-sqlite3/contributors","subscribers_url":"https://api.github.com/repos/bengotow/node-sqlite3/subscribers","subscription_url":"https://api.github.com/repos/bengotow/node-sqlite3/subscription","commits_url":"https://api.github.com/repos/bengotow/node-sqlite3/commits{/sha}","git_commits_url":"https://api.github.com/repos/bengotow/node-sqlite3/git/commits{/sha}","comments_url":"https://api.github.com/repos/bengotow/node-sqlite3/comments{/number}","issue_comment_url":"https://api.github.com/repos/bengotow/node-sqlite3/issues/comments{/number}","contents_url":"https://api.github.com/repos/bengotow/node-sqlite3/contents/{+path}","compare_url":"https://api.github.com/repos/bengotow/node-sqlite3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bengotow/node-sqlite3/merges","archive_url":"https://api.github.com/repos/bengotow/node-sqlite3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bengotow/node-sqlite3/downloads","issues_url":"https://api.github.com/repos/bengotow/node-sqlite3/issues{/number}","pulls_url":"https://api.github.com/repos/bengotow/node-sqlite3/pulls{/number}","milestones_url":"https://api.github.com/repos/bengotow/node-sqlite3/milestones{/number}","notifications_url":"https://api.github.com/repos/bengotow/node-sqlite3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bengotow/node-sqlite3/labels{/name}","releases_url":"https://api.github.com/repos/bengotow/node-sqlite3/releases{/id}","deployments_url":"https://api.github.com/repos/bengotow/node-sqlite3/deployments","created_at":"2015-07-30T16:28:04Z","updated_at":"2015-07-30T16:28:05Z","pushed_at":"2016-09-16T15:43:58Z","git_url":"git://github.com/bengotow/node-sqlite3.git","ssh_url":"git@github.com:bengotow/node-sqlite3.git","clone_url":"https://github.com/bengotow/node-sqlite3.git","svn_url":"https://github.com/bengotow/node-sqlite3","homepage":"","size":32396,"stargazers_count":0,"watchers_count":0,"language":"PLpgSQL","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapbox:master","ref":"master","sha":"c191e61ec59e26c8bbbff1a6508204fd98f41043","user":{"login":"mapbox","id":600935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMDkzNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":1367055,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY3MDU1","name":"node-sqlite3","full_name":"mapbox/node-sqlite3","private":false,"owner":{"login":"mapbox","id":600935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMDkzNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/600935?v=4","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mapbox/node-sqlite3","description":"Asynchronous, non-blocking SQLite3 bindings for Node.js","fork":false,"url":"https://api.github.com/repos/mapbox/node-sqlite3","forks_url":"https://api.github.com/repos/mapbox/node-sqlite3/forks","keys_url":"https://api.github.com/repos/mapbox/node-sqlite3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/node-sqlite3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/node-sqlite3/teams","hooks_url":"https://api.github.com/repos/mapbox/node-sqlite3/hooks","issue_events_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/node-sqlite3/events","assignees_url":"https://api.github.com/repos/mapbox/node-sqlite3/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/node-sqlite3/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/node-sqlite3/tags","blobs_url":"https://api.github.com/repos/mapbox/node-sqlite3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/node-sqlite3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/node-sqlite3/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/node-sqlite3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/node-sqlite3/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/node-sqlite3/languages","stargazers_url":"https://api.github.com/repos/mapbox/node-sqlite3/stargazers","contributors_url":"https://api.github.com/repos/mapbox/node-sqlite3/contributors","subscribers_url":"https://api.github.com/repos/mapbox/node-sqlite3/subscribers","subscription_url":"https://api.github.com/repos/mapbox/node-sqlite3/subscription","commits_url":"https://api.github.com/repos/mapbox/node-sqlite3/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/node-sqlite3/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/node-sqlite3/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/node-sqlite3/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/node-sqlite3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/node-sqlite3/merges","archive_url":"https://api.github.com/repos/mapbox/node-sqlite3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/node-sqlite3/downloads","issues_url":"https://api.github.com/repos/mapbox/node-sqlite3/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/node-sqlite3/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/node-sqlite3/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/node-sqlite3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/node-sqlite3/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/node-sqlite3/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/node-sqlite3/deployments","created_at":"2011-02-14T21:50:01Z","updated_at":"2018-11-26T11:54:12Z","pushed_at":"2018-11-26T01:33:23Z","git_url":"git://github.com/mapbox/node-sqlite3.git","ssh_url":"git@github.com:mapbox/node-sqlite3.git","clone_url":"https://github.com/mapbox/node-sqlite3.git","svn_url":"https://github.com/mapbox/node-sqlite3","homepage":"","size":35618,"stargazers_count":3369,"watchers_count":3369,"language":"PLpgSQL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":469,"mirror_url":null,"archived":false,"open_issues_count":272,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":469,"open_issues":272,"watchers":3369,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapbox/node-sqlite3/pulls/576"},"html":{"href":"https://github.com/mapbox/node-sqlite3/pull/576"},"issue":{"href":"https://api.github.com/repos/mapbox/node-sqlite3/issues/576"},"comments":{"href":"https://api.github.com/repos/mapbox/node-sqlite3/issues/576/comments"},"review_comments":{"href":"https://api.github.com/repos/mapbox/node-sqlite3/pulls/576/comments"},"review_comment":{"href":"https://api.github.com/repos/mapbox/node-sqlite3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapbox/node-sqlite3/pulls/576/commits"},"statuses":{"href":"https://api.github.com/repos/mapbox/node-sqlite3/statuses/48984d8166a909052b0f84d10d5fc7bb18130ce6"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":6,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":6,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"kewde"}}