{"action":"created","comment":{"url":"https://api.github.com/repos/storj/storj/pulls/comments/243419890","pull_request_review_id":187187329,"id":243419890,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzQxOTg5MA==","diff_hunk":"@@ -222,60 +186,58 @@ func (k *Kademlia) Ping(ctx context.Context, node pb.Node) (pb.Node, error) {\n \tif err != nil {\n \t\treturn pb.Node{}, NodeErr.Wrap(err)\n \t}\n-\n \tif !ok {\n \t\treturn pb.Node{}, NodeErr.New(\"Failed pinging node\")\n \t}\n-\n \treturn node, nil\n }\n \n // FindNode looks up the provided NodeID first in the local Node, and if it is not found\n // begins searching the network for the NodeID. Returns and error if node was not found\n func (k *Kademlia) FindNode(ctx context.Context, ID storj.NodeID) (pb.Node, error) {\n+\treturn k.lookup(ctx, ID, false)\n+}\n+\n+//lookup initiates a kadmelia node lookup\n+func (k *Kademlia) lookup(ctx context.Context, ID storj.NodeID, isBootstrap bool) (pb.Node, error) {\n \tkb := k.routingTable.K()\n-\tnodes, err := k.routingTable.FindNear(ID, kb)\n-\tif err != nil {\n-\t\treturn pb.Node{}, err\n+\tvar nodes []*pb.Node\n+\tif isBootstrap {\n+\t\tfor _, v := range k.bootstrapNodes {\n+\t\t\tnodes = append(nodes, &v)\n+\t\t}\n+\t} else {\n+\t\tvar err error\n+\t\tnodes, err = k.routingTable.FindNear(ID, kb)\n+\t\tif err != nil {\n+\t\t\treturn pb.Node{}, err\n+\t\t}\n \t}\n-\n \tlookup := newPeerDiscovery(k.log, nodes, k.nodeClient, ID, discoveryOptions{\n-\t\tconcurrency: k.alpha, retries: defaultRetries, bootstrap: false, bootstrapNodes: k.bootstrapNodes,\n+\t\tconcurrency: k.alpha, retries: defaultRetries, bootstrap: isBootstrap, bootstrapNodes: k.bootstrapNodes,\n \t})\n-\n \ttarget, err := lookup.Run(ctx)\n \tif err != nil {\n \t\treturn pb.Node{}, err\n \t}\n+\tbucket, err := k.routingTable.getKBucketID(ID)\n+\tif err != nil {\n+\t\tk.log.Warn(\"Error getting getKBucketID in kad lookup\")","path":"pkg/kademlia/kademlia.go","position":166,"original_position":166,"commit_id":"d9ae63a7909210d6d9297f6abacca61c0f3c13f2","original_commit_id":"d9ae63a7909210d6d9297f6abacca61c0f3c13f2","user":{"login":"wthorp","id":977287,"node_id":"MDQ6VXNlcjk3NzI4Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/977287?v=4","gravatar_id":"","url":"https://api.github.com/users/wthorp","html_url":"https://github.com/wthorp","followers_url":"https://api.github.com/users/wthorp/followers","following_url":"https://api.github.com/users/wthorp/following{/other_user}","gists_url":"https://api.github.com/users/wthorp/gists{/gist_id}","starred_url":"https://api.github.com/users/wthorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wthorp/subscriptions","organizations_url":"https://api.github.com/users/wthorp/orgs","repos_url":"https://api.github.com/users/wthorp/repos","events_url":"https://api.github.com/users/wthorp/events{/privacy}","received_events_url":"https://api.github.com/users/wthorp/received_events","type":"User","site_admin":false},"body":"I guess the question is, what benefit would we get by propagating it up?  It's never supposed to happen, but the worst case effect is that we do extra work ever hour.  We definitely wouldn't want things to stop working because of this.  But we would want to know about it.  DPanic() might be a better choice?","created_at":"2018-12-20T21:14:51Z","updated_at":"2018-12-20T21:14:51Z","html_url":"https://github.com/storj/storj/pull/908#discussion_r243419890","pull_request_url":"https://api.github.com/repos/storj/storj/pulls/908","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/storj/storj/pulls/comments/243419890"},"html":{"href":"https://github.com/storj/storj/pull/908#discussion_r243419890"},"pull_request":{"href":"https://api.github.com/repos/storj/storj/pulls/908"}},"in_reply_to_id":243415451},"pull_request":{"url":"https://api.github.com/repos/storj/storj/pulls/908","id":239809541,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5ODA5NTQx","html_url":"https://github.com/storj/storj/pull/908","diff_url":"https://github.com/storj/storj/pull/908.diff","patch_url":"https://github.com/storj/storj/pull/908.patch","issue_url":"https://api.github.com/repos/storj/storj/issues/908","number":908,"state":"open","locked":false,"title":"Add the ability for Kademlia to do a refresh for each bucket","user":{"login":"wthorp","id":977287,"node_id":"MDQ6VXNlcjk3NzI4Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/977287?v=4","gravatar_id":"","url":"https://api.github.com/users/wthorp","html_url":"https://github.com/wthorp","followers_url":"https://api.github.com/users/wthorp/followers","following_url":"https://api.github.com/users/wthorp/following{/other_user}","gists_url":"https://api.github.com/users/wthorp/gists{/gist_id}","starred_url":"https://api.github.com/users/wthorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wthorp/subscriptions","organizations_url":"https://api.github.com/users/wthorp/orgs","repos_url":"https://api.github.com/users/wthorp/repos","events_url":"https://api.github.com/users/wthorp/events{/privacy}","received_events_url":"https://api.github.com/users/wthorp/received_events","type":"User","site_admin":false},"body":"Find all bucket that we have not contacted nodes on in the last hour\r\nfind a random ID in each of those bucket spaces\r\nDo a lookup on that ID\r\nThis will allow us to find nodes in the same neighborhood as that node\r\nThese nodes need to be put into the overlay routing table or the overlay cache (this is done everytime we do a lookup for a node automatically)","created_at":"2018-12-19T11:55:11Z","updated_at":"2018-12-20T21:14:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"815f097b4c658ff43923d49c26a2d73ca26138b8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":982933521,"node_id":"MDU6TGFiZWw5ODI5MzM1MjE=","url":"https://api.github.com/repos/storj/storj/labels/cla-signed","name":"cla-signed","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/storj/storj/pulls/908/commits","review_comments_url":"https://api.github.com/repos/storj/storj/pulls/908/comments","review_comment_url":"https://api.github.com/repos/storj/storj/pulls/comments{/number}","comments_url":"https://api.github.com/repos/storj/storj/issues/908/comments","statuses_url":"https://api.github.com/repos/storj/storj/statuses/d9ae63a7909210d6d9297f6abacca61c0f3c13f2","head":{"label":"storj:bt/kadRefresh","ref":"bt/kadRefresh","sha":"d9ae63a7909210d6d9297f6abacca61c0f3c13f2","user":{"login":"storj","id":6308081,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMDgwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/6308081?v=4","gravatar_id":"","url":"https://api.github.com/users/storj","html_url":"https://github.com/storj","followers_url":"https://api.github.com/users/storj/followers","following_url":"https://api.github.com/users/storj/following{/other_user}","gists_url":"https://api.github.com/users/storj/gists{/gist_id}","starred_url":"https://api.github.com/users/storj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storj/subscriptions","organizations_url":"https://api.github.com/users/storj/orgs","repos_url":"https://api.github.com/users/storj/repos","events_url":"https://api.github.com/users/storj/events{/privacy}","received_events_url":"https://api.github.com/users/storj/received_events","type":"Organization","site_admin":false},"repo":{"id":128089774,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgwODk3NzQ=","name":"storj","full_name":"storj/storj","private":false,"owner":{"login":"storj","id":6308081,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMDgwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/6308081?v=4","gravatar_id":"","url":"https://api.github.com/users/storj","html_url":"https://github.com/storj","followers_url":"https://api.github.com/users/storj/followers","following_url":"https://api.github.com/users/storj/following{/other_user}","gists_url":"https://api.github.com/users/storj/gists{/gist_id}","starred_url":"https://api.github.com/users/storj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storj/subscriptions","organizations_url":"https://api.github.com/users/storj/orgs","repos_url":"https://api.github.com/users/storj/repos","events_url":"https://api.github.com/users/storj/events{/privacy}","received_events_url":"https://api.github.com/users/storj/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/storj/storj","description":"Ongoing Storj v3 development. Decentralized cloud object storage that is affordable, easy to use, private, and secure.","fork":false,"url":"https://api.github.com/repos/storj/storj","forks_url":"https://api.github.com/repos/storj/storj/forks","keys_url":"https://api.github.com/repos/storj/storj/keys{/key_id}","collaborators_url":"https://api.github.com/repos/storj/storj/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/storj/storj/teams","hooks_url":"https://api.github.com/repos/storj/storj/hooks","issue_events_url":"https://api.github.com/repos/storj/storj/issues/events{/number}","events_url":"https://api.github.com/repos/storj/storj/events","assignees_url":"https://api.github.com/repos/storj/storj/assignees{/user}","branches_url":"https://api.github.com/repos/storj/storj/branches{/branch}","tags_url":"https://api.github.com/repos/storj/storj/tags","blobs_url":"https://api.github.com/repos/storj/storj/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/storj/storj/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/storj/storj/git/refs{/sha}","trees_url":"https://api.github.com/repos/storj/storj/git/trees{/sha}","statuses_url":"https://api.github.com/repos/storj/storj/statuses/{sha}","languages_url":"https://api.github.com/repos/storj/storj/languages","stargazers_url":"https://api.github.com/repos/storj/storj/stargazers","contributors_url":"https://api.github.com/repos/storj/storj/contributors","subscribers_url":"https://api.github.com/repos/storj/storj/subscribers","subscription_url":"https://api.github.com/repos/storj/storj/subscription","commits_url":"https://api.github.com/repos/storj/storj/commits{/sha}","git_commits_url":"https://api.github.com/repos/storj/storj/git/commits{/sha}","comments_url":"https://api.github.com/repos/storj/storj/comments{/number}","issue_comment_url":"https://api.github.com/repos/storj/storj/issues/comments{/number}","contents_url":"https://api.github.com/repos/storj/storj/contents/{+path}","compare_url":"https://api.github.com/repos/storj/storj/compare/{base}...{head}","merges_url":"https://api.github.com/repos/storj/storj/merges","archive_url":"https://api.github.com/repos/storj/storj/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/storj/storj/downloads","issues_url":"https://api.github.com/repos/storj/storj/issues{/number}","pulls_url":"https://api.github.com/repos/storj/storj/pulls{/number}","milestones_url":"https://api.github.com/repos/storj/storj/milestones{/number}","notifications_url":"https://api.github.com/repos/storj/storj/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/storj/storj/labels{/name}","releases_url":"https://api.github.com/repos/storj/storj/releases{/id}","deployments_url":"https://api.github.com/repos/storj/storj/deployments","created_at":"2018-04-04T16:27:18Z","updated_at":"2018-12-20T20:10:31Z","pushed_at":"2018-12-20T21:03:56Z","git_url":"git://github.com/storj/storj.git","ssh_url":"git@github.com:storj/storj.git","clone_url":"https://github.com/storj/storj.git","svn_url":"https://github.com/storj/storj","homepage":"https://storj.io","size":64856,"stargazers_count":380,"watchers_count":380,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":86,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":86,"open_issues":30,"watchers":380,"default_branch":"master"}},"base":{"label":"storj:master","ref":"master","sha":"ac860c19841f07b55ca6a84043e15336d32ffa16","user":{"login":"storj","id":6308081,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMDgwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/6308081?v=4","gravatar_id":"","url":"https://api.github.com/users/storj","html_url":"https://github.com/storj","followers_url":"https://api.github.com/users/storj/followers","following_url":"https://api.github.com/users/storj/following{/other_user}","gists_url":"https://api.github.com/users/storj/gists{/gist_id}","starred_url":"https://api.github.com/users/storj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storj/subscriptions","organizations_url":"https://api.github.com/users/storj/orgs","repos_url":"https://api.github.com/users/storj/repos","events_url":"https://api.github.com/users/storj/events{/privacy}","received_events_url":"https://api.github.com/users/storj/received_events","type":"Organization","site_admin":false},"repo":{"id":128089774,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgwODk3NzQ=","name":"storj","full_name":"storj/storj","private":false,"owner":{"login":"storj","id":6308081,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzMDgwODE=","avatar_url":"https://avatars3.githubusercontent.com/u/6308081?v=4","gravatar_id":"","url":"https://api.github.com/users/storj","html_url":"https://github.com/storj","followers_url":"https://api.github.com/users/storj/followers","following_url":"https://api.github.com/users/storj/following{/other_user}","gists_url":"https://api.github.com/users/storj/gists{/gist_id}","starred_url":"https://api.github.com/users/storj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storj/subscriptions","organizations_url":"https://api.github.com/users/storj/orgs","repos_url":"https://api.github.com/users/storj/repos","events_url":"https://api.github.com/users/storj/events{/privacy}","received_events_url":"https://api.github.com/users/storj/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/storj/storj","description":"Ongoing Storj v3 development. Decentralized cloud object storage that is affordable, easy to use, private, and secure.","fork":false,"url":"https://api.github.com/repos/storj/storj","forks_url":"https://api.github.com/repos/storj/storj/forks","keys_url":"https://api.github.com/repos/storj/storj/keys{/key_id}","collaborators_url":"https://api.github.com/repos/storj/storj/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/storj/storj/teams","hooks_url":"https://api.github.com/repos/storj/storj/hooks","issue_events_url":"https://api.github.com/repos/storj/storj/issues/events{/number}","events_url":"https://api.github.com/repos/storj/storj/events","assignees_url":"https://api.github.com/repos/storj/storj/assignees{/user}","branches_url":"https://api.github.com/repos/storj/storj/branches{/branch}","tags_url":"https://api.github.com/repos/storj/storj/tags","blobs_url":"https://api.github.com/repos/storj/storj/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/storj/storj/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/storj/storj/git/refs{/sha}","trees_url":"https://api.github.com/repos/storj/storj/git/trees{/sha}","statuses_url":"https://api.github.com/repos/storj/storj/statuses/{sha}","languages_url":"https://api.github.com/repos/storj/storj/languages","stargazers_url":"https://api.github.com/repos/storj/storj/stargazers","contributors_url":"https://api.github.com/repos/storj/storj/contributors","subscribers_url":"https://api.github.com/repos/storj/storj/subscribers","subscription_url":"https://api.github.com/repos/storj/storj/subscription","commits_url":"https://api.github.com/repos/storj/storj/commits{/sha}","git_commits_url":"https://api.github.com/repos/storj/storj/git/commits{/sha}","comments_url":"https://api.github.com/repos/storj/storj/comments{/number}","issue_comment_url":"https://api.github.com/repos/storj/storj/issues/comments{/number}","contents_url":"https://api.github.com/repos/storj/storj/contents/{+path}","compare_url":"https://api.github.com/repos/storj/storj/compare/{base}...{head}","merges_url":"https://api.github.com/repos/storj/storj/merges","archive_url":"https://api.github.com/repos/storj/storj/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/storj/storj/downloads","issues_url":"https://api.github.com/repos/storj/storj/issues{/number}","pulls_url":"https://api.github.com/repos/storj/storj/pulls{/number}","milestones_url":"https://api.github.com/repos/storj/storj/milestones{/number}","notifications_url":"https://api.github.com/repos/storj/storj/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/storj/storj/labels{/name}","releases_url":"https://api.github.com/repos/storj/storj/releases{/id}","deployments_url":"https://api.github.com/repos/storj/storj/deployments","created_at":"2018-04-04T16:27:18Z","updated_at":"2018-12-20T20:10:31Z","pushed_at":"2018-12-20T21:03:56Z","git_url":"git://github.com/storj/storj.git","ssh_url":"git@github.com:storj/storj.git","clone_url":"https://github.com/storj/storj.git","svn_url":"https://github.com/storj/storj","homepage":"https://storj.io","size":64856,"stargazers_count":380,"watchers_count":380,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":86,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":86,"open_issues":30,"watchers":380,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/storj/storj/pulls/908"},"html":{"href":"https://github.com/storj/storj/pull/908"},"issue":{"href":"https://api.github.com/repos/storj/storj/issues/908"},"comments":{"href":"https://api.github.com/repos/storj/storj/issues/908/comments"},"review_comments":{"href":"https://api.github.com/repos/storj/storj/pulls/908/comments"},"review_comment":{"href":"https://api.github.com/repos/storj/storj/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/storj/storj/pulls/908/commits"},"statuses":{"href":"https://api.github.com/repos/storj/storj/statuses/d9ae63a7909210d6d9297f6abacca61c0f3c13f2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wthorp"}}