{"action":"created","comment":{"url":"https://api.github.com/repos/derekkraan/horde/pulls/comments/195362996","pull_request_review_id":128715514,"id":195362996,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTM2Mjk5Ng==","diff_hunk":"@@ -172,7 +184,15 @@ defmodule Horde.Registry do\n   def handle_info(:processes_updated, state) do\n     processes = GenServer.call(state.processes_pid, {:read, @crdt})\n \n-    {:noreply, %{state | processes: processes}}\n+    :ets.insert(state.ets_table, Map.to_list(processes))\n+\n+    all_keys = :ets.match(state.ets_table, {:\"$1\", :_}) |> MapSet.new(fn [x] -> x end)\n+    new_keys = Map.keys(processes) |> MapSet.new()\n+    to_delete_keys = MapSet.difference(all_keys, new_keys)\n+\n+    to_delete_keys |> Enum.each(fn key -> :ets.delete(state.ets_table, key) end)","path":"lib/horde/registry.ex","position":79,"original_position":79,"commit_id":"83c339e7f402de814bdbea7e909fa3ed05bd1b25","original_commit_id":"83c339e7f402de814bdbea7e909fa3ed05bd1b25","user":{"login":"Tuxified","id":51889,"node_id":"MDQ6VXNlcjUxODg5","avatar_url":"https://avatars0.githubusercontent.com/u/51889?v=4","gravatar_id":"","url":"https://api.github.com/users/Tuxified","html_url":"https://github.com/Tuxified","followers_url":"https://api.github.com/users/Tuxified/followers","following_url":"https://api.github.com/users/Tuxified/following{/other_user}","gists_url":"https://api.github.com/users/Tuxified/gists{/gist_id}","starred_url":"https://api.github.com/users/Tuxified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tuxified/subscriptions","organizations_url":"https://api.github.com/users/Tuxified/orgs","repos_url":"https://api.github.com/users/Tuxified/repos","events_url":"https://api.github.com/users/Tuxified/events{/privacy}","received_events_url":"https://api.github.com/users/Tuxified/received_events","type":"User","site_admin":false},"body":"I wonder if there isn't a way to delete multiple items in 1 go?","created_at":"2018-06-14T09:50:17Z","updated_at":"2018-06-14T09:54:00Z","html_url":"https://github.com/derekkraan/horde/pull/7#discussion_r195362996","pull_request_url":"https://api.github.com/repos/derekkraan/horde/pulls/7","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/derekkraan/horde/pulls/comments/195362996"},"html":{"href":"https://github.com/derekkraan/horde/pull/7#discussion_r195362996"},"pull_request":{"href":"https://api.github.com/repos/derekkraan/horde/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/derekkraan/horde/pulls/7","id":194827684,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0ODI3Njg0","html_url":"https://github.com/derekkraan/horde/pull/7","diff_url":"https://github.com/derekkraan/horde/pull/7.diff","patch_url":"https://github.com/derekkraan/horde/pull/7.patch","issue_url":"https://api.github.com/repos/derekkraan/horde/issues/7","number":7,"state":"open","locked":false,"title":"Use ETS to remove bottleneck on Horde.Registry read operations","user":{"login":"derekkraan","id":522157,"node_id":"MDQ6VXNlcjUyMjE1Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/522157?v=4","gravatar_id":"","url":"https://api.github.com/users/derekkraan","html_url":"https://github.com/derekkraan","followers_url":"https://api.github.com/users/derekkraan/followers","following_url":"https://api.github.com/users/derekkraan/following{/other_user}","gists_url":"https://api.github.com/users/derekkraan/gists{/gist_id}","starred_url":"https://api.github.com/users/derekkraan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekkraan/subscriptions","organizations_url":"https://api.github.com/users/derekkraan/orgs","repos_url":"https://api.github.com/users/derekkraan/repos","events_url":"https://api.github.com/users/derekkraan/events{/privacy}","received_events_url":"https://api.github.com/users/derekkraan/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-14T09:17:11Z","updated_at":"2018-06-14T09:54:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad474a1c2eace271c666a93daf09dd5e67997a4c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/derekkraan/horde/pulls/7/commits","review_comments_url":"https://api.github.com/repos/derekkraan/horde/pulls/7/comments","review_comment_url":"https://api.github.com/repos/derekkraan/horde/pulls/comments{/number}","comments_url":"https://api.github.com/repos/derekkraan/horde/issues/7/comments","statuses_url":"https://api.github.com/repos/derekkraan/horde/statuses/83c339e7f402de814bdbea7e909fa3ed05bd1b25","head":{"label":"derekkraan:ets_registry","ref":"ets_registry","sha":"83c339e7f402de814bdbea7e909fa3ed05bd1b25","user":{"login":"derekkraan","id":522157,"node_id":"MDQ6VXNlcjUyMjE1Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/522157?v=4","gravatar_id":"","url":"https://api.github.com/users/derekkraan","html_url":"https://github.com/derekkraan","followers_url":"https://api.github.com/users/derekkraan/followers","following_url":"https://api.github.com/users/derekkraan/following{/other_user}","gists_url":"https://api.github.com/users/derekkraan/gists{/gist_id}","starred_url":"https://api.github.com/users/derekkraan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekkraan/subscriptions","organizations_url":"https://api.github.com/users/derekkraan/orgs","repos_url":"https://api.github.com/users/derekkraan/repos","events_url":"https://api.github.com/users/derekkraan/events{/privacy}","received_events_url":"https://api.github.com/users/derekkraan/received_events","type":"User","site_admin":false},"repo":{"id":132625346,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI2MjUzNDY=","name":"horde","full_name":"derekkraan/horde","owner":{"login":"derekkraan","id":522157,"node_id":"MDQ6VXNlcjUyMjE1Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/522157?v=4","gravatar_id":"","url":"https://api.github.com/users/derekkraan","html_url":"https://github.com/derekkraan","followers_url":"https://api.github.com/users/derekkraan/followers","following_url":"https://api.github.com/users/derekkraan/following{/other_user}","gists_url":"https://api.github.com/users/derekkraan/gists{/gist_id}","starred_url":"https://api.github.com/users/derekkraan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekkraan/subscriptions","organizations_url":"https://api.github.com/users/derekkraan/orgs","repos_url":"https://api.github.com/users/derekkraan/repos","events_url":"https://api.github.com/users/derekkraan/events{/privacy}","received_events_url":"https://api.github.com/users/derekkraan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/derekkraan/horde","description":"Horde is a distributed process registry and supervisor built on δ-CRDTs","fork":false,"url":"https://api.github.com/repos/derekkraan/horde","forks_url":"https://api.github.com/repos/derekkraan/horde/forks","keys_url":"https://api.github.com/repos/derekkraan/horde/keys{/key_id}","collaborators_url":"https://api.github.com/repos/derekkraan/horde/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/derekkraan/horde/teams","hooks_url":"https://api.github.com/repos/derekkraan/horde/hooks","issue_events_url":"https://api.github.com/repos/derekkraan/horde/issues/events{/number}","events_url":"https://api.github.com/repos/derekkraan/horde/events","assignees_url":"https://api.github.com/repos/derekkraan/horde/assignees{/user}","branches_url":"https://api.github.com/repos/derekkraan/horde/branches{/branch}","tags_url":"https://api.github.com/repos/derekkraan/horde/tags","blobs_url":"https://api.github.com/repos/derekkraan/horde/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/derekkraan/horde/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/derekkraan/horde/git/refs{/sha}","trees_url":"https://api.github.com/repos/derekkraan/horde/git/trees{/sha}","statuses_url":"https://api.github.com/repos/derekkraan/horde/statuses/{sha}","languages_url":"https://api.github.com/repos/derekkraan/horde/languages","stargazers_url":"https://api.github.com/repos/derekkraan/horde/stargazers","contributors_url":"https://api.github.com/repos/derekkraan/horde/contributors","subscribers_url":"https://api.github.com/repos/derekkraan/horde/subscribers","subscription_url":"https://api.github.com/repos/derekkraan/horde/subscription","commits_url":"https://api.github.com/repos/derekkraan/horde/commits{/sha}","git_commits_url":"https://api.github.com/repos/derekkraan/horde/git/commits{/sha}","comments_url":"https://api.github.com/repos/derekkraan/horde/comments{/number}","issue_comment_url":"https://api.github.com/repos/derekkraan/horde/issues/comments{/number}","contents_url":"https://api.github.com/repos/derekkraan/horde/contents/{+path}","compare_url":"https://api.github.com/repos/derekkraan/horde/compare/{base}...{head}","merges_url":"https://api.github.com/repos/derekkraan/horde/merges","archive_url":"https://api.github.com/repos/derekkraan/horde/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/derekkraan/horde/downloads","issues_url":"https://api.github.com/repos/derekkraan/horde/issues{/number}","pulls_url":"https://api.github.com/repos/derekkraan/horde/pulls{/number}","milestones_url":"https://api.github.com/repos/derekkraan/horde/milestones{/number}","notifications_url":"https://api.github.com/repos/derekkraan/horde/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/derekkraan/horde/labels{/name}","releases_url":"https://api.github.com/repos/derekkraan/horde/releases{/id}","deployments_url":"https://api.github.com/repos/derekkraan/horde/deployments","created_at":"2018-05-08T15:01:01Z","updated_at":"2018-06-13T14:45:40Z","pushed_at":"2018-06-14T09:17:12Z","git_url":"git://github.com/derekkraan/horde.git","ssh_url":"git@github.com:derekkraan/horde.git","clone_url":"https://github.com/derekkraan/horde.git","svn_url":"https://github.com/derekkraan/horde","homepage":"","size":63,"stargazers_count":62,"watchers_count":62,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":2,"watchers":62,"default_branch":"master"}},"base":{"label":"derekkraan:master","ref":"master","sha":"38c58c6ddd6b986cabe8258e5475d9cff00c6f61","user":{"login":"derekkraan","id":522157,"node_id":"MDQ6VXNlcjUyMjE1Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/522157?v=4","gravatar_id":"","url":"https://api.github.com/users/derekkraan","html_url":"https://github.com/derekkraan","followers_url":"https://api.github.com/users/derekkraan/followers","following_url":"https://api.github.com/users/derekkraan/following{/other_user}","gists_url":"https://api.github.com/users/derekkraan/gists{/gist_id}","starred_url":"https://api.github.com/users/derekkraan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekkraan/subscriptions","organizations_url":"https://api.github.com/users/derekkraan/orgs","repos_url":"https://api.github.com/users/derekkraan/repos","events_url":"https://api.github.com/users/derekkraan/events{/privacy}","received_events_url":"https://api.github.com/users/derekkraan/received_events","type":"User","site_admin":false},"repo":{"id":132625346,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI2MjUzNDY=","name":"horde","full_name":"derekkraan/horde","owner":{"login":"derekkraan","id":522157,"node_id":"MDQ6VXNlcjUyMjE1Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/522157?v=4","gravatar_id":"","url":"https://api.github.com/users/derekkraan","html_url":"https://github.com/derekkraan","followers_url":"https://api.github.com/users/derekkraan/followers","following_url":"https://api.github.com/users/derekkraan/following{/other_user}","gists_url":"https://api.github.com/users/derekkraan/gists{/gist_id}","starred_url":"https://api.github.com/users/derekkraan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekkraan/subscriptions","organizations_url":"https://api.github.com/users/derekkraan/orgs","repos_url":"https://api.github.com/users/derekkraan/repos","events_url":"https://api.github.com/users/derekkraan/events{/privacy}","received_events_url":"https://api.github.com/users/derekkraan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/derekkraan/horde","description":"Horde is a distributed process registry and supervisor built on δ-CRDTs","fork":false,"url":"https://api.github.com/repos/derekkraan/horde","forks_url":"https://api.github.com/repos/derekkraan/horde/forks","keys_url":"https://api.github.com/repos/derekkraan/horde/keys{/key_id}","collaborators_url":"https://api.github.com/repos/derekkraan/horde/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/derekkraan/horde/teams","hooks_url":"https://api.github.com/repos/derekkraan/horde/hooks","issue_events_url":"https://api.github.com/repos/derekkraan/horde/issues/events{/number}","events_url":"https://api.github.com/repos/derekkraan/horde/events","assignees_url":"https://api.github.com/repos/derekkraan/horde/assignees{/user}","branches_url":"https://api.github.com/repos/derekkraan/horde/branches{/branch}","tags_url":"https://api.github.com/repos/derekkraan/horde/tags","blobs_url":"https://api.github.com/repos/derekkraan/horde/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/derekkraan/horde/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/derekkraan/horde/git/refs{/sha}","trees_url":"https://api.github.com/repos/derekkraan/horde/git/trees{/sha}","statuses_url":"https://api.github.com/repos/derekkraan/horde/statuses/{sha}","languages_url":"https://api.github.com/repos/derekkraan/horde/languages","stargazers_url":"https://api.github.com/repos/derekkraan/horde/stargazers","contributors_url":"https://api.github.com/repos/derekkraan/horde/contributors","subscribers_url":"https://api.github.com/repos/derekkraan/horde/subscribers","subscription_url":"https://api.github.com/repos/derekkraan/horde/subscription","commits_url":"https://api.github.com/repos/derekkraan/horde/commits{/sha}","git_commits_url":"https://api.github.com/repos/derekkraan/horde/git/commits{/sha}","comments_url":"https://api.github.com/repos/derekkraan/horde/comments{/number}","issue_comment_url":"https://api.github.com/repos/derekkraan/horde/issues/comments{/number}","contents_url":"https://api.github.com/repos/derekkraan/horde/contents/{+path}","compare_url":"https://api.github.com/repos/derekkraan/horde/compare/{base}...{head}","merges_url":"https://api.github.com/repos/derekkraan/horde/merges","archive_url":"https://api.github.com/repos/derekkraan/horde/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/derekkraan/horde/downloads","issues_url":"https://api.github.com/repos/derekkraan/horde/issues{/number}","pulls_url":"https://api.github.com/repos/derekkraan/horde/pulls{/number}","milestones_url":"https://api.github.com/repos/derekkraan/horde/milestones{/number}","notifications_url":"https://api.github.com/repos/derekkraan/horde/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/derekkraan/horde/labels{/name}","releases_url":"https://api.github.com/repos/derekkraan/horde/releases{/id}","deployments_url":"https://api.github.com/repos/derekkraan/horde/deployments","created_at":"2018-05-08T15:01:01Z","updated_at":"2018-06-13T14:45:40Z","pushed_at":"2018-06-14T09:17:12Z","git_url":"git://github.com/derekkraan/horde.git","ssh_url":"git@github.com:derekkraan/horde.git","clone_url":"https://github.com/derekkraan/horde.git","svn_url":"https://github.com/derekkraan/horde","homepage":"","size":63,"stargazers_count":62,"watchers_count":62,"language":"Elixir","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":2,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/derekkraan/horde/pulls/7"},"html":{"href":"https://github.com/derekkraan/horde/pull/7"},"issue":{"href":"https://api.github.com/repos/derekkraan/horde/issues/7"},"comments":{"href":"https://api.github.com/repos/derekkraan/horde/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/derekkraan/horde/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/derekkraan/horde/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/derekkraan/horde/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/derekkraan/horde/statuses/83c339e7f402de814bdbea7e909fa3ed05bd1b25"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Tuxified"}}