{"action":"opened","number":442,"pull_request":{"url":"https://api.github.com/repos/mapbox/carmen/pulls/442","id":60628479,"html_url":"https://github.com/mapbox/carmen/pull/442","diff_url":"https://github.com/mapbox/carmen/pull/442.diff","patch_url":"https://github.com/mapbox/carmen/pull/442.patch","issue_url":"https://api.github.com/repos/mapbox/carmen/issues/442","number":442,"state":"open","locked":false,"title":"during index update, make dictcache writable first","user":{"login":"mtmail","id":3727288,"avatar_url":"https://avatars.githubusercontent.com/u/3727288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtmail","html_url":"https://github.com/mtmail","followers_url":"https://api.github.com/users/mtmail/followers","following_url":"https://api.github.com/users/mtmail/following{/other_user}","gists_url":"https://api.github.com/users/mtmail/gists{/gist_id}","starred_url":"https://api.github.com/users/mtmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtmail/subscriptions","organizations_url":"https://api.github.com/users/mtmail/orgs","repos_url":"https://api.github.com/users/mtmail/repos","events_url":"https://api.github.com/users/mtmail/events{/privacy}","received_events_url":"https://api.github.com/users/mtmail/received_events","type":"User","site_admin":false},"body":"`update()` receives a CarmenSource instance.\r\n\r\nThat `source` might already contain geocoder data and thus during index opening/loading `source._dictcache` is set to `ReadCache` instance. See https://github.com/mapbox/carmen/blob/master/lib/util/dawg.js#L43\r\n\r\nTo be able to update the `._dictcache` we'd need a `WriteCache` though.\r\n\r\nI opted to clear the `._dictcache` since the update operation seems to be a full overwrite without rollback on error. I couldn't find a good place to add test to an existing test file.","created_at":"2016-02-25T05:40:26Z","updated_at":"2016-02-25T05:40:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mapbox/carmen/pulls/442/commits","review_comments_url":"https://api.github.com/repos/mapbox/carmen/pulls/442/comments","review_comment_url":"https://api.github.com/repos/mapbox/carmen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapbox/carmen/issues/442/comments","statuses_url":"https://api.github.com/repos/mapbox/carmen/statuses/0b737c7c96c135c238f0a40858b3e9fed8a6df8e","head":{"label":"mtmail:clear-dictcache-on-update","ref":"clear-dictcache-on-update","sha":"0b737c7c96c135c238f0a40858b3e9fed8a6df8e","user":{"login":"mtmail","id":3727288,"avatar_url":"https://avatars.githubusercontent.com/u/3727288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtmail","html_url":"https://github.com/mtmail","followers_url":"https://api.github.com/users/mtmail/followers","following_url":"https://api.github.com/users/mtmail/following{/other_user}","gists_url":"https://api.github.com/users/mtmail/gists{/gist_id}","starred_url":"https://api.github.com/users/mtmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtmail/subscriptions","organizations_url":"https://api.github.com/users/mtmail/orgs","repos_url":"https://api.github.com/users/mtmail/repos","events_url":"https://api.github.com/users/mtmail/events{/privacy}","received_events_url":"https://api.github.com/users/mtmail/received_events","type":"User","site_admin":false},"repo":{"id":51213042,"name":"carmen","full_name":"mtmail/carmen","owner":{"login":"mtmail","id":3727288,"avatar_url":"https://avatars.githubusercontent.com/u/3727288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtmail","html_url":"https://github.com/mtmail","followers_url":"https://api.github.com/users/mtmail/followers","following_url":"https://api.github.com/users/mtmail/following{/other_user}","gists_url":"https://api.github.com/users/mtmail/gists{/gist_id}","starred_url":"https://api.github.com/users/mtmail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtmail/subscriptions","organizations_url":"https://api.github.com/users/mtmail/orgs","repos_url":"https://api.github.com/users/mtmail/repos","events_url":"https://api.github.com/users/mtmail/events{/privacy}","received_events_url":"https://api.github.com/users/mtmail/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mtmail/carmen","description":"Mapnik vector tile-based geocoder with support for swappable data sources","fork":true,"url":"https://api.github.com/repos/mtmail/carmen","forks_url":"https://api.github.com/repos/mtmail/carmen/forks","keys_url":"https://api.github.com/repos/mtmail/carmen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mtmail/carmen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mtmail/carmen/teams","hooks_url":"https://api.github.com/repos/mtmail/carmen/hooks","issue_events_url":"https://api.github.com/repos/mtmail/carmen/issues/events{/number}","events_url":"https://api.github.com/repos/mtmail/carmen/events","assignees_url":"https://api.github.com/repos/mtmail/carmen/assignees{/user}","branches_url":"https://api.github.com/repos/mtmail/carmen/branches{/branch}","tags_url":"https://api.github.com/repos/mtmail/carmen/tags","blobs_url":"https://api.github.com/repos/mtmail/carmen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mtmail/carmen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mtmail/carmen/git/refs{/sha}","trees_url":"https://api.github.com/repos/mtmail/carmen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mtmail/carmen/statuses/{sha}","languages_url":"https://api.github.com/repos/mtmail/carmen/languages","stargazers_url":"https://api.github.com/repos/mtmail/carmen/stargazers","contributors_url":"https://api.github.com/repos/mtmail/carmen/contributors","subscribers_url":"https://api.github.com/repos/mtmail/carmen/subscribers","subscription_url":"https://api.github.com/repos/mtmail/carmen/subscription","commits_url":"https://api.github.com/repos/mtmail/carmen/commits{/sha}","git_commits_url":"https://api.github.com/repos/mtmail/carmen/git/commits{/sha}","comments_url":"https://api.github.com/repos/mtmail/carmen/comments{/number}","issue_comment_url":"https://api.github.com/repos/mtmail/carmen/issues/comments{/number}","contents_url":"https://api.github.com/repos/mtmail/carmen/contents/{+path}","compare_url":"https://api.github.com/repos/mtmail/carmen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mtmail/carmen/merges","archive_url":"https://api.github.com/repos/mtmail/carmen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mtmail/carmen/downloads","issues_url":"https://api.github.com/repos/mtmail/carmen/issues{/number}","pulls_url":"https://api.github.com/repos/mtmail/carmen/pulls{/number}","milestones_url":"https://api.github.com/repos/mtmail/carmen/milestones{/number}","notifications_url":"https://api.github.com/repos/mtmail/carmen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mtmail/carmen/labels{/name}","releases_url":"https://api.github.com/repos/mtmail/carmen/releases{/id}","deployments_url":"https://api.github.com/repos/mtmail/carmen/deployments","created_at":"2016-02-06T17:33:25Z","updated_at":"2016-02-06T17:33:27Z","pushed_at":"2016-02-25T05:20:14Z","git_url":"git://github.com/mtmail/carmen.git","ssh_url":"git@github.com:mtmail/carmen.git","clone_url":"https://github.com/mtmail/carmen.git","svn_url":"https://github.com/mtmail/carmen","homepage":"","size":8662,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapbox:master","ref":"master","sha":"a593a9a25fcce160293a89e5d896f792e99c3ad7","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","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":4587149,"name":"carmen","full_name":"mapbox/carmen","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","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},"private":false,"html_url":"https://github.com/mapbox/carmen","description":"Mapnik vector tile-based geocoder with support for swappable data sources","fork":false,"url":"https://api.github.com/repos/mapbox/carmen","forks_url":"https://api.github.com/repos/mapbox/carmen/forks","keys_url":"https://api.github.com/repos/mapbox/carmen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/carmen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/carmen/teams","hooks_url":"https://api.github.com/repos/mapbox/carmen/hooks","issue_events_url":"https://api.github.com/repos/mapbox/carmen/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/carmen/events","assignees_url":"https://api.github.com/repos/mapbox/carmen/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/carmen/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/carmen/tags","blobs_url":"https://api.github.com/repos/mapbox/carmen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/carmen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/carmen/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/carmen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/carmen/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/carmen/languages","stargazers_url":"https://api.github.com/repos/mapbox/carmen/stargazers","contributors_url":"https://api.github.com/repos/mapbox/carmen/contributors","subscribers_url":"https://api.github.com/repos/mapbox/carmen/subscribers","subscription_url":"https://api.github.com/repos/mapbox/carmen/subscription","commits_url":"https://api.github.com/repos/mapbox/carmen/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/carmen/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/carmen/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/carmen/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/carmen/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/carmen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/carmen/merges","archive_url":"https://api.github.com/repos/mapbox/carmen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/carmen/downloads","issues_url":"https://api.github.com/repos/mapbox/carmen/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/carmen/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/carmen/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/carmen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/carmen/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/carmen/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/carmen/deployments","created_at":"2012-06-07T15:50:21Z","updated_at":"2016-02-23T08:15:05Z","pushed_at":"2016-02-24T18:56:06Z","git_url":"git://github.com/mapbox/carmen.git","ssh_url":"git@github.com:mapbox/carmen.git","clone_url":"https://github.com/mapbox/carmen.git","svn_url":"https://github.com/mapbox/carmen","homepage":"","size":9000,"stargazers_count":134,"watchers_count":134,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":37,"forks":23,"open_issues":37,"watchers":134,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapbox/carmen/pulls/442"},"html":{"href":"https://github.com/mapbox/carmen/pull/442"},"issue":{"href":"https://api.github.com/repos/mapbox/carmen/issues/442"},"comments":{"href":"https://api.github.com/repos/mapbox/carmen/issues/442/comments"},"review_comments":{"href":"https://api.github.com/repos/mapbox/carmen/pulls/442/comments"},"review_comment":{"href":"https://api.github.com/repos/mapbox/carmen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapbox/carmen/pulls/442/commits"},"statuses":{"href":"https://api.github.com/repos/mapbox/carmen/statuses/0b737c7c96c135c238f0a40858b3e9fed8a6df8e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":0,"changed_files":1}}