{"action":"created","comment":{"url":"https://api.github.com/repos/docker/libnetwork/pulls/comments/200442228","pull_request_review_id":134761228,"id":200442228,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDQ0MjIyOA==","diff_hunk":"@@ -403,6 +444,107 @@ func doNetworkPeers(ips []string, args []string) {\n \tclose(doneCh)\n }\n \n+// network-stats-queue networkName <gt/lt> queueSize\n+func doNetworkStatsQueue(ips []string, args []string) {\n+\tdoneCh := make(chan resultTuple, len(ips))\n+\tnetworkName := args[0]\n+\tcomparison := args[1]\n+\tsize, _ := strconv.Atoi(args[2])\n+\n+\t// check all the nodes\n+\tfor _, ip := range ips {\n+\t\tgo dbQueueLength(ip, servicePort, networkName, doneCh)\n+\t}\n+\n+\tvar avgQueueSize int\n+\t// wait for the readiness of all nodes\n+\tfor i := len(ips); i > 0; i-- {\n+\t\tnode := <-doneCh\n+\t\tswitch comparison {\n+\t\tcase \"lt\":\n+\t\t\tif node.result > size {\n+\t\t\t\tlog.Fatalf(\"Expected queue size from %s to be %d < %d\", node.id, node.result, size)\n+\t\t\t}","path":"cmd/networkdb-test/dbclient/ndbClient.go","position":168,"original_position":168,"commit_id":"5ed38221164e04c78d20f17839aab52fafd7fe88","original_commit_id":"dd5a9eaba3974e06f7b678c6cc02c58d2e18dd30","user":{"login":"ctelfer","id":11477598,"node_id":"MDQ6VXNlcjExNDc3NTk4","avatar_url":"https://avatars3.githubusercontent.com/u/11477598?v=4","gravatar_id":"","url":"https://api.github.com/users/ctelfer","html_url":"https://github.com/ctelfer","followers_url":"https://api.github.com/users/ctelfer/followers","following_url":"https://api.github.com/users/ctelfer/following{/other_user}","gists_url":"https://api.github.com/users/ctelfer/gists{/gist_id}","starred_url":"https://api.github.com/users/ctelfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctelfer/subscriptions","organizations_url":"https://api.github.com/users/ctelfer/orgs","repos_url":"https://api.github.com/users/ctelfer/repos","events_url":"https://api.github.com/users/ctelfer/events{/privacy}","received_events_url":"https://api.github.com/users/ctelfer/received_events","type":"User","site_admin":false},"body":"Ah, I understand now that this is a test, not an information gathering function despite its debug output at the end.  Please disregard this comment and the one below.","created_at":"2018-07-05T18:10:11Z","updated_at":"2018-07-05T18:10:11Z","html_url":"https://github.com/docker/libnetwork/pull/2216#discussion_r200442228","pull_request_url":"https://api.github.com/repos/docker/libnetwork/pulls/2216","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/comments/200442228"},"html":{"href":"https://github.com/docker/libnetwork/pull/2216#discussion_r200442228"},"pull_request":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/2216"}},"in_reply_to_id":200375660},"pull_request":{"url":"https://api.github.com/repos/docker/libnetwork/pulls/2216","id":198817935,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4ODE3OTM1","html_url":"https://github.com/docker/libnetwork/pull/2216","diff_url":"https://github.com/docker/libnetwork/pull/2216.diff","patch_url":"https://github.com/docker/libnetwork/pull/2216.patch","issue_url":"https://api.github.com/repos/docker/libnetwork/issues/2216","number":2216,"state":"open","locked":false,"title":"NetworkDB qlen optimization","user":{"login":"fcrisciani","id":1823625,"node_id":"MDQ6VXNlcjE4MjM2MjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1823625?v=4","gravatar_id":"","url":"https://api.github.com/users/fcrisciani","html_url":"https://github.com/fcrisciani","followers_url":"https://api.github.com/users/fcrisciani/followers","following_url":"https://api.github.com/users/fcrisciani/following{/other_user}","gists_url":"https://api.github.com/users/fcrisciani/gists{/gist_id}","starred_url":"https://api.github.com/users/fcrisciani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcrisciani/subscriptions","organizations_url":"https://api.github.com/users/fcrisciani/orgs","repos_url":"https://api.github.com/users/fcrisciani/repos","events_url":"https://api.github.com/users/fcrisciani/events{/privacy}","received_events_url":"https://api.github.com/users/fcrisciani/received_events","type":"User","site_admin":false},"body":"Added some optimizations to reduce the messages in the queue:\r\n1) on join network the node execute a tcp sync with all the nodes that it is aware part of the specific network. During this time before the node was redistributing all the entries. This meant that if the network had 10K entries the queue of the joining node will jump to 10K. The fix adds a flag on the network that would avoid to insert any entry in the queue till the sync happens. Note that right now the flag is set in a best effort way, there is no real check if at least one of the nodes succeed.\r\n2) limit the number of messages to redistribute coming from a TCP sync. Introduced a threshold that limit the number of messages that are propagated, this will disable this optimization in case of heavy load.\r\n\r\nThe other commit is mainly testing infrastructure to expose the queue length and to allow to write a fixed number of entries.\r\n","created_at":"2018-07-03T00:00:56Z","updated_at":"2018-07-05T18:10:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"225e69237f8310dc121c3700e79669097296dbe6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/docker/libnetwork/pulls/2216/commits","review_comments_url":"https://api.github.com/repos/docker/libnetwork/pulls/2216/comments","review_comment_url":"https://api.github.com/repos/docker/libnetwork/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/libnetwork/issues/2216/comments","statuses_url":"https://api.github.com/repos/docker/libnetwork/statuses/5ed38221164e04c78d20f17839aab52fafd7fe88","head":{"label":"fcrisciani:netdb-qlen-issue","ref":"netdb-qlen-issue","sha":"5ed38221164e04c78d20f17839aab52fafd7fe88","user":{"login":"fcrisciani","id":1823625,"node_id":"MDQ6VXNlcjE4MjM2MjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1823625?v=4","gravatar_id":"","url":"https://api.github.com/users/fcrisciani","html_url":"https://github.com/fcrisciani","followers_url":"https://api.github.com/users/fcrisciani/followers","following_url":"https://api.github.com/users/fcrisciani/following{/other_user}","gists_url":"https://api.github.com/users/fcrisciani/gists{/gist_id}","starred_url":"https://api.github.com/users/fcrisciani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcrisciani/subscriptions","organizations_url":"https://api.github.com/users/fcrisciani/orgs","repos_url":"https://api.github.com/users/fcrisciani/repos","events_url":"https://api.github.com/users/fcrisciani/events{/privacy}","received_events_url":"https://api.github.com/users/fcrisciani/received_events","type":"User","site_admin":false},"repo":{"id":85609005,"node_id":"MDEwOlJlcG9zaXRvcnk4NTYwOTAwNQ==","name":"libnetwork","full_name":"fcrisciani/libnetwork","owner":{"login":"fcrisciani","id":1823625,"node_id":"MDQ6VXNlcjE4MjM2MjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1823625?v=4","gravatar_id":"","url":"https://api.github.com/users/fcrisciani","html_url":"https://github.com/fcrisciani","followers_url":"https://api.github.com/users/fcrisciani/followers","following_url":"https://api.github.com/users/fcrisciani/following{/other_user}","gists_url":"https://api.github.com/users/fcrisciani/gists{/gist_id}","starred_url":"https://api.github.com/users/fcrisciani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcrisciani/subscriptions","organizations_url":"https://api.github.com/users/fcrisciani/orgs","repos_url":"https://api.github.com/users/fcrisciani/repos","events_url":"https://api.github.com/users/fcrisciani/events{/privacy}","received_events_url":"https://api.github.com/users/fcrisciani/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fcrisciani/libnetwork","description":"Docker Networking","fork":true,"url":"https://api.github.com/repos/fcrisciani/libnetwork","forks_url":"https://api.github.com/repos/fcrisciani/libnetwork/forks","keys_url":"https://api.github.com/repos/fcrisciani/libnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fcrisciani/libnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fcrisciani/libnetwork/teams","hooks_url":"https://api.github.com/repos/fcrisciani/libnetwork/hooks","issue_events_url":"https://api.github.com/repos/fcrisciani/libnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/fcrisciani/libnetwork/events","assignees_url":"https://api.github.com/repos/fcrisciani/libnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/fcrisciani/libnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/fcrisciani/libnetwork/tags","blobs_url":"https://api.github.com/repos/fcrisciani/libnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fcrisciani/libnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fcrisciani/libnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/fcrisciani/libnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fcrisciani/libnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/fcrisciani/libnetwork/languages","stargazers_url":"https://api.github.com/repos/fcrisciani/libnetwork/stargazers","contributors_url":"https://api.github.com/repos/fcrisciani/libnetwork/contributors","subscribers_url":"https://api.github.com/repos/fcrisciani/libnetwork/subscribers","subscription_url":"https://api.github.com/repos/fcrisciani/libnetwork/subscription","commits_url":"https://api.github.com/repos/fcrisciani/libnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/fcrisciani/libnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/fcrisciani/libnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/fcrisciani/libnetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/fcrisciani/libnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/fcrisciani/libnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fcrisciani/libnetwork/merges","archive_url":"https://api.github.com/repos/fcrisciani/libnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fcrisciani/libnetwork/downloads","issues_url":"https://api.github.com/repos/fcrisciani/libnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/fcrisciani/libnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/fcrisciani/libnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/fcrisciani/libnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fcrisciani/libnetwork/labels{/name}","releases_url":"https://api.github.com/repos/fcrisciani/libnetwork/releases{/id}","deployments_url":"https://api.github.com/repos/fcrisciani/libnetwork/deployments","created_at":"2017-03-20T17:58:15Z","updated_at":"2017-03-20T17:58:19Z","pushed_at":"2018-07-04T00:45:15Z","git_url":"git://github.com/fcrisciani/libnetwork.git","ssh_url":"git@github.com:fcrisciani/libnetwork.git","clone_url":"https://github.com/fcrisciani/libnetwork.git","svn_url":"https://github.com/fcrisciani/libnetwork","homepage":"","size":21677,"stargazers_count":0,"watchers_count":0,"language":"Go","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":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"820ca50a59615d3c7ffe5884fd90e60b0fce54df","user":{"login":"docker","id":5429470,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/5429470?v=4","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":31046054,"node_id":"MDEwOlJlcG9zaXRvcnkzMTA0NjA1NA==","name":"libnetwork","full_name":"docker/libnetwork","owner":{"login":"docker","id":5429470,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/5429470?v=4","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/libnetwork","description":"Docker Networking","fork":false,"url":"https://api.github.com/repos/docker/libnetwork","forks_url":"https://api.github.com/repos/docker/libnetwork/forks","keys_url":"https://api.github.com/repos/docker/libnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/libnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/libnetwork/teams","hooks_url":"https://api.github.com/repos/docker/libnetwork/hooks","issue_events_url":"https://api.github.com/repos/docker/libnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/docker/libnetwork/events","assignees_url":"https://api.github.com/repos/docker/libnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/docker/libnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/docker/libnetwork/tags","blobs_url":"https://api.github.com/repos/docker/libnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/libnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/libnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/libnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/libnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/libnetwork/languages","stargazers_url":"https://api.github.com/repos/docker/libnetwork/stargazers","contributors_url":"https://api.github.com/repos/docker/libnetwork/contributors","subscribers_url":"https://api.github.com/repos/docker/libnetwork/subscribers","subscription_url":"https://api.github.com/repos/docker/libnetwork/subscription","commits_url":"https://api.github.com/repos/docker/libnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/libnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/libnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/libnetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/libnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/docker/libnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/libnetwork/merges","archive_url":"https://api.github.com/repos/docker/libnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/libnetwork/downloads","issues_url":"https://api.github.com/repos/docker/libnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/docker/libnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/libnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/libnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/libnetwork/labels{/name}","releases_url":"https://api.github.com/repos/docker/libnetwork/releases{/id}","deployments_url":"https://api.github.com/repos/docker/libnetwork/deployments","created_at":"2015-02-20T01:20:15Z","updated_at":"2018-07-05T16:37:46Z","pushed_at":"2018-07-05T16:37:27Z","git_url":"git://github.com/docker/libnetwork.git","ssh_url":"git@github.com:docker/libnetwork.git","clone_url":"https://github.com/docker/libnetwork.git","svn_url":"https://github.com/docker/libnetwork","homepage":"","size":14375,"stargazers_count":1154,"watchers_count":1154,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":621,"mirror_url":null,"archived":false,"open_issues_count":199,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":621,"open_issues":199,"watchers":1154,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/2216"},"html":{"href":"https://github.com/docker/libnetwork/pull/2216"},"issue":{"href":"https://api.github.com/repos/docker/libnetwork/issues/2216"},"comments":{"href":"https://api.github.com/repos/docker/libnetwork/issues/2216/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/2216/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/libnetwork/pulls/2216/commits"},"statuses":{"href":"https://api.github.com/repos/docker/libnetwork/statuses/5ed38221164e04c78d20f17839aab52fafd7fe88"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ctelfer"}}