{"action":"created","comment":{"url":"https://api.github.com/repos/projectcalico/felix/pulls/comments/105396463","pull_request_review_id":26276423,"id":105396463,"diff_hunk":"@@ -666,32 +667,64 @@ func (d *InternalDataplane) apply() {\n \n \t// Next, create/update IP sets.  We defer deletions of IP sets until after we update\n \t// iptables.\n-\tfor _, w := range d.ipSets {\n-\t\tw.ApplyUpdates()\n+\tvar ipSetsWG sync.WaitGroup\n+\tfor _, ipSets := range d.ipSets {\n+\t\tipSetsWG.Add(1)\n+\t\tgo func(ipSets *ipsets.IPSets) {\n+\t\t\tipSets.ApplyUpdates()\n+\t\t\tipSetsWG.Done()\n+\t\t}(ipSets)","path":"intdataplane/int_dataplane.go","position":20,"original_position":20,"commit_id":"0b77f18ca03c0e1198b431e1c572a721ce6620a1","original_commit_id":"0b77f18ca03c0e1198b431e1c572a721ce6620a1","user":{"login":"neiljerram","id":2089263,"avatar_url":"https://avatars2.githubusercontent.com/u/2089263?v=3","gravatar_id":"","url":"https://api.github.com/users/neiljerram","html_url":"https://github.com/neiljerram","followers_url":"https://api.github.com/users/neiljerram/followers","following_url":"https://api.github.com/users/neiljerram/following{/other_user}","gists_url":"https://api.github.com/users/neiljerram/gists{/gist_id}","starred_url":"https://api.github.com/users/neiljerram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neiljerram/subscriptions","organizations_url":"https://api.github.com/users/neiljerram/orgs","repos_url":"https://api.github.com/users/neiljerram/repos","events_url":"https://api.github.com/users/neiljerram/events{/privacy}","received_events_url":"https://api.github.com/users/neiljerram/received_events","type":"User","site_admin":false},"body":"Out of interest, is passing ipSets through as an arg, as here, equivalent to adding `ipSets := ipSets` at the start of the loop?  Or are there other factors?","created_at":"2017-03-10T13:33:03Z","updated_at":"2017-03-10T13:40:25Z","html_url":"https://github.com/projectcalico/felix/pull/1383#discussion_r105396463","pull_request_url":"https://api.github.com/repos/projectcalico/felix/pulls/1383","_links":{"self":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/comments/105396463"},"html":{"href":"https://github.com/projectcalico/felix/pull/1383#discussion_r105396463"},"pull_request":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/1383"}}},"pull_request":{"url":"https://api.github.com/repos/projectcalico/felix/pulls/1383","id":109944088,"html_url":"https://github.com/projectcalico/felix/pull/1383","diff_url":"https://github.com/projectcalico/felix/pull/1383.diff","patch_url":"https://github.com/projectcalico/felix/pull/1383.patch","issue_url":"https://api.github.com/repos/projectcalico/felix/issues/1383","number":1383,"state":"open","locked":false,"title":"Do dataplane updates in parallel for IPv4/6.","user":{"login":"fasaxc","id":469264,"avatar_url":"https://avatars3.githubusercontent.com/u/469264?v=3","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/received_events","type":"User","site_admin":false},"body":"Roughly halves the time spent in apply().","created_at":"2017-03-09T15:55:15Z","updated_at":"2017-03-10T13:40:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"678baeb38f6859e3e511753ad77e5f8435943edb","assignee":{"login":"neiljerram","id":2089263,"avatar_url":"https://avatars2.githubusercontent.com/u/2089263?v=3","gravatar_id":"","url":"https://api.github.com/users/neiljerram","html_url":"https://github.com/neiljerram","followers_url":"https://api.github.com/users/neiljerram/followers","following_url":"https://api.github.com/users/neiljerram/following{/other_user}","gists_url":"https://api.github.com/users/neiljerram/gists{/gist_id}","starred_url":"https://api.github.com/users/neiljerram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neiljerram/subscriptions","organizations_url":"https://api.github.com/users/neiljerram/orgs","repos_url":"https://api.github.com/users/neiljerram/repos","events_url":"https://api.github.com/users/neiljerram/events{/privacy}","received_events_url":"https://api.github.com/users/neiljerram/received_events","type":"User","site_admin":false},"assignees":[{"login":"neiljerram","id":2089263,"avatar_url":"https://avatars2.githubusercontent.com/u/2089263?v=3","gravatar_id":"","url":"https://api.github.com/users/neiljerram","html_url":"https://github.com/neiljerram","followers_url":"https://api.github.com/users/neiljerram/followers","following_url":"https://api.github.com/users/neiljerram/following{/other_user}","gists_url":"https://api.github.com/users/neiljerram/gists{/gist_id}","starred_url":"https://api.github.com/users/neiljerram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neiljerram/subscriptions","organizations_url":"https://api.github.com/users/neiljerram/orgs","repos_url":"https://api.github.com/users/neiljerram/repos","events_url":"https://api.github.com/users/neiljerram/events{/privacy}","received_events_url":"https://api.github.com/users/neiljerram/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/projectcalico/felix/milestones/32","html_url":"https://github.com/projectcalico/felix/milestone/32","labels_url":"https://api.github.com/repos/projectcalico/felix/milestones/32/labels","id":2366203,"number":32,"title":"Calico v2.1.1","description":"","creator":{"login":"fasaxc","id":469264,"avatar_url":"https://avatars3.githubusercontent.com/u/469264?v=3","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":5,"state":"open","created_at":"2017-03-06T14:30:49Z","updated_at":"2017-03-10T10:13:01Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/projectcalico/felix/pulls/1383/commits","review_comments_url":"https://api.github.com/repos/projectcalico/felix/pulls/1383/comments","review_comment_url":"https://api.github.com/repos/projectcalico/felix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectcalico/felix/issues/1383/comments","statuses_url":"https://api.github.com/repos/projectcalico/felix/statuses/0b77f18ca03c0e1198b431e1c572a721ce6620a1","head":{"label":"fasaxc:apply-in-parallel","ref":"apply-in-parallel","sha":"0b77f18ca03c0e1198b431e1c572a721ce6620a1","user":{"login":"fasaxc","id":469264,"avatar_url":"https://avatars3.githubusercontent.com/u/469264?v=3","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/received_events","type":"User","site_admin":false},"repo":{"id":31398578,"name":"felix","full_name":"fasaxc/felix","owner":{"login":"fasaxc","id":469264,"avatar_url":"https://avatars3.githubusercontent.com/u/469264?v=3","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fasaxc/felix","description":"Project Calico core repository.","fork":true,"url":"https://api.github.com/repos/fasaxc/felix","forks_url":"https://api.github.com/repos/fasaxc/felix/forks","keys_url":"https://api.github.com/repos/fasaxc/felix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fasaxc/felix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fasaxc/felix/teams","hooks_url":"https://api.github.com/repos/fasaxc/felix/hooks","issue_events_url":"https://api.github.com/repos/fasaxc/felix/issues/events{/number}","events_url":"https://api.github.com/repos/fasaxc/felix/events","assignees_url":"https://api.github.com/repos/fasaxc/felix/assignees{/user}","branches_url":"https://api.github.com/repos/fasaxc/felix/branches{/branch}","tags_url":"https://api.github.com/repos/fasaxc/felix/tags","blobs_url":"https://api.github.com/repos/fasaxc/felix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fasaxc/felix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fasaxc/felix/git/refs{/sha}","trees_url":"https://api.github.com/repos/fasaxc/felix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fasaxc/felix/statuses/{sha}","languages_url":"https://api.github.com/repos/fasaxc/felix/languages","stargazers_url":"https://api.github.com/repos/fasaxc/felix/stargazers","contributors_url":"https://api.github.com/repos/fasaxc/felix/contributors","subscribers_url":"https://api.github.com/repos/fasaxc/felix/subscribers","subscription_url":"https://api.github.com/repos/fasaxc/felix/subscription","commits_url":"https://api.github.com/repos/fasaxc/felix/commits{/sha}","git_commits_url":"https://api.github.com/repos/fasaxc/felix/git/commits{/sha}","comments_url":"https://api.github.com/repos/fasaxc/felix/comments{/number}","issue_comment_url":"https://api.github.com/repos/fasaxc/felix/issues/comments{/number}","contents_url":"https://api.github.com/repos/fasaxc/felix/contents/{+path}","compare_url":"https://api.github.com/repos/fasaxc/felix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fasaxc/felix/merges","archive_url":"https://api.github.com/repos/fasaxc/felix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fasaxc/felix/downloads","issues_url":"https://api.github.com/repos/fasaxc/felix/issues{/number}","pulls_url":"https://api.github.com/repos/fasaxc/felix/pulls{/number}","milestones_url":"https://api.github.com/repos/fasaxc/felix/milestones{/number}","notifications_url":"https://api.github.com/repos/fasaxc/felix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fasaxc/felix/labels{/name}","releases_url":"https://api.github.com/repos/fasaxc/felix/releases{/id}","deployments_url":"https://api.github.com/repos/fasaxc/felix/deployments","created_at":"2015-02-27T01:55:32Z","updated_at":"2016-10-07T08:22:23Z","pushed_at":"2017-03-10T10:13:06Z","git_url":"git://github.com/fasaxc/felix.git","ssh_url":"git@github.com:fasaxc/felix.git","clone_url":"https://github.com/fasaxc/felix.git","svn_url":"https://github.com/fasaxc/felix","homepage":"http://projectcalico.org/","size":7872,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"projectcalico:master","ref":"master","sha":"fd224a6990bd6e2fc138b78f14a8f7b1ded95dd0","user":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars0.githubusercontent.com/u/12304728?v=3","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"repo":{"id":21242831,"name":"felix","full_name":"projectcalico/felix","owner":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars0.githubusercontent.com/u/12304728?v=3","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectcalico/felix","description":"Project Calico's per-host agent Felix, responsible for programming routes and security policy.","fork":false,"url":"https://api.github.com/repos/projectcalico/felix","forks_url":"https://api.github.com/repos/projectcalico/felix/forks","keys_url":"https://api.github.com/repos/projectcalico/felix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectcalico/felix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectcalico/felix/teams","hooks_url":"https://api.github.com/repos/projectcalico/felix/hooks","issue_events_url":"https://api.github.com/repos/projectcalico/felix/issues/events{/number}","events_url":"https://api.github.com/repos/projectcalico/felix/events","assignees_url":"https://api.github.com/repos/projectcalico/felix/assignees{/user}","branches_url":"https://api.github.com/repos/projectcalico/felix/branches{/branch}","tags_url":"https://api.github.com/repos/projectcalico/felix/tags","blobs_url":"https://api.github.com/repos/projectcalico/felix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectcalico/felix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectcalico/felix/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectcalico/felix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectcalico/felix/statuses/{sha}","languages_url":"https://api.github.com/repos/projectcalico/felix/languages","stargazers_url":"https://api.github.com/repos/projectcalico/felix/stargazers","contributors_url":"https://api.github.com/repos/projectcalico/felix/contributors","subscribers_url":"https://api.github.com/repos/projectcalico/felix/subscribers","subscription_url":"https://api.github.com/repos/projectcalico/felix/subscription","commits_url":"https://api.github.com/repos/projectcalico/felix/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectcalico/felix/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectcalico/felix/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectcalico/felix/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectcalico/felix/contents/{+path}","compare_url":"https://api.github.com/repos/projectcalico/felix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectcalico/felix/merges","archive_url":"https://api.github.com/repos/projectcalico/felix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectcalico/felix/downloads","issues_url":"https://api.github.com/repos/projectcalico/felix/issues{/number}","pulls_url":"https://api.github.com/repos/projectcalico/felix/pulls{/number}","milestones_url":"https://api.github.com/repos/projectcalico/felix/milestones{/number}","notifications_url":"https://api.github.com/repos/projectcalico/felix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectcalico/felix/labels{/name}","releases_url":"https://api.github.com/repos/projectcalico/felix/releases{/id}","deployments_url":"https://api.github.com/repos/projectcalico/felix/deployments","created_at":"2014-06-26T14:08:43Z","updated_at":"2017-03-06T03:17:05Z","pushed_at":"2017-03-10T10:13:01Z","git_url":"git://github.com/projectcalico/felix.git","ssh_url":"git@github.com:projectcalico/felix.git","clone_url":"https://github.com/projectcalico/felix.git","svn_url":"https://github.com/projectcalico/felix","homepage":"http://projectcalico.org/","size":7827,"stargazers_count":644,"watchers_count":644,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":129,"mirror_url":null,"open_issues_count":27,"forks":129,"open_issues":27,"watchers":644,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/1383"},"html":{"href":"https://github.com/projectcalico/felix/pull/1383"},"issue":{"href":"https://api.github.com/repos/projectcalico/felix/issues/1383"},"comments":{"href":"https://api.github.com/repos/projectcalico/felix/issues/1383/comments"},"review_comments":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/1383/comments"},"review_comment":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectcalico/felix/pulls/1383/commits"},"statuses":{"href":"https://api.github.com/repos/projectcalico/felix/statuses/0b77f18ca03c0e1198b431e1c572a721ce6620a1"}}}}
{"actor":{"display_login":"neiljerram"}}