{"action":"opened","number":6072,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/6072","id":66584061,"html_url":"https://github.com/cockroachdb/cockroach/pull/6072","diff_url":"https://github.com/cockroachdb/cockroach/pull/6072.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/6072.patch","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/6072","number":6072,"state":"open","locked":false,"title":"added a new KV API method called InitPut()","user":{"login":"vivekmenezes","id":11774212,"avatar_url":"https://avatars.githubusercontent.com/u/11774212?v=3","gravatar_id":"","url":"https://api.github.com/users/vivekmenezes","html_url":"https://github.com/vivekmenezes","followers_url":"https://api.github.com/users/vivekmenezes/followers","following_url":"https://api.github.com/users/vivekmenezes/following{/other_user}","gists_url":"https://api.github.com/users/vivekmenezes/gists{/gist_id}","starred_url":"https://api.github.com/users/vivekmenezes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivekmenezes/subscriptions","organizations_url":"https://api.github.com/users/vivekmenezes/orgs","repos_url":"https://api.github.com/users/vivekmenezes/repos","events_url":"https://api.github.com/users/vivekmenezes/events{/privacy}","received_events_url":"https://api.github.com/users/vivekmenezes/received_events","type":"User","site_admin":false},"body":"InitPut(key, value) puts the value for the key if it doesn't exist.\r\nIt returns an error if the key exists and the existing value for the\r\nkey is not equal to the supplied value. This method will be used to\r\nbackfill a sql table index.\r\n\r\nAnother option to add a boolen to CPut() was considered, but during\r\nthe implementation that option looked so ugly, especially given the beauty\r\nof CPut, that we decided to create a new method. This decision was also\r\ninfluenced by an unwillingness to adopt the bad practice of putting\r\nbooleans in an API.\r\n\r\nSee: http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html","created_at":"2016-04-15T02:58:37Z","updated_at":"2016-04-15T02:58:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/6072/commits","review_comments_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/6072/comments","review_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/6072/comments","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/d999098e581d1c4fa400279b9a37b521852f788e","head":{"label":"vivekmenezes:vivek/newcput","ref":"vivek/newcput","sha":"d999098e581d1c4fa400279b9a37b521852f788e","user":{"login":"vivekmenezes","id":11774212,"avatar_url":"https://avatars.githubusercontent.com/u/11774212?v=3","gravatar_id":"","url":"https://api.github.com/users/vivekmenezes","html_url":"https://github.com/vivekmenezes","followers_url":"https://api.github.com/users/vivekmenezes/followers","following_url":"https://api.github.com/users/vivekmenezes/following{/other_user}","gists_url":"https://api.github.com/users/vivekmenezes/gists{/gist_id}","starred_url":"https://api.github.com/users/vivekmenezes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivekmenezes/subscriptions","organizations_url":"https://api.github.com/users/vivekmenezes/orgs","repos_url":"https://api.github.com/users/vivekmenezes/repos","events_url":"https://api.github.com/users/vivekmenezes/events{/privacy}","received_events_url":"https://api.github.com/users/vivekmenezes/received_events","type":"User","site_admin":false},"repo":{"id":34078715,"name":"cockroach","full_name":"vivekmenezes/cockroach","owner":{"login":"vivekmenezes","id":11774212,"avatar_url":"https://avatars.githubusercontent.com/u/11774212?v=3","gravatar_id":"","url":"https://api.github.com/users/vivekmenezes","html_url":"https://github.com/vivekmenezes","followers_url":"https://api.github.com/users/vivekmenezes/followers","following_url":"https://api.github.com/users/vivekmenezes/following{/other_user}","gists_url":"https://api.github.com/users/vivekmenezes/gists{/gist_id}","starred_url":"https://api.github.com/users/vivekmenezes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivekmenezes/subscriptions","organizations_url":"https://api.github.com/users/vivekmenezes/orgs","repos_url":"https://api.github.com/users/vivekmenezes/repos","events_url":"https://api.github.com/users/vivekmenezes/events{/privacy}","received_events_url":"https://api.github.com/users/vivekmenezes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vivekmenezes/cockroach","description":"A Scalable, Geo-Replicated, Transactional Datastore","fork":true,"url":"https://api.github.com/repos/vivekmenezes/cockroach","forks_url":"https://api.github.com/repos/vivekmenezes/cockroach/forks","keys_url":"https://api.github.com/repos/vivekmenezes/cockroach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vivekmenezes/cockroach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vivekmenezes/cockroach/teams","hooks_url":"https://api.github.com/repos/vivekmenezes/cockroach/hooks","issue_events_url":"https://api.github.com/repos/vivekmenezes/cockroach/issues/events{/number}","events_url":"https://api.github.com/repos/vivekmenezes/cockroach/events","assignees_url":"https://api.github.com/repos/vivekmenezes/cockroach/assignees{/user}","branches_url":"https://api.github.com/repos/vivekmenezes/cockroach/branches{/branch}","tags_url":"https://api.github.com/repos/vivekmenezes/cockroach/tags","blobs_url":"https://api.github.com/repos/vivekmenezes/cockroach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vivekmenezes/cockroach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vivekmenezes/cockroach/git/refs{/sha}","trees_url":"https://api.github.com/repos/vivekmenezes/cockroach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vivekmenezes/cockroach/statuses/{sha}","languages_url":"https://api.github.com/repos/vivekmenezes/cockroach/languages","stargazers_url":"https://api.github.com/repos/vivekmenezes/cockroach/stargazers","contributors_url":"https://api.github.com/repos/vivekmenezes/cockroach/contributors","subscribers_url":"https://api.github.com/repos/vivekmenezes/cockroach/subscribers","subscription_url":"https://api.github.com/repos/vivekmenezes/cockroach/subscription","commits_url":"https://api.github.com/repos/vivekmenezes/cockroach/commits{/sha}","git_commits_url":"https://api.github.com/repos/vivekmenezes/cockroach/git/commits{/sha}","comments_url":"https://api.github.com/repos/vivekmenezes/cockroach/comments{/number}","issue_comment_url":"https://api.github.com/repos/vivekmenezes/cockroach/issues/comments{/number}","contents_url":"https://api.github.com/repos/vivekmenezes/cockroach/contents/{+path}","compare_url":"https://api.github.com/repos/vivekmenezes/cockroach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vivekmenezes/cockroach/merges","archive_url":"https://api.github.com/repos/vivekmenezes/cockroach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vivekmenezes/cockroach/downloads","issues_url":"https://api.github.com/repos/vivekmenezes/cockroach/issues{/number}","pulls_url":"https://api.github.com/repos/vivekmenezes/cockroach/pulls{/number}","milestones_url":"https://api.github.com/repos/vivekmenezes/cockroach/milestones{/number}","notifications_url":"https://api.github.com/repos/vivekmenezes/cockroach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vivekmenezes/cockroach/labels{/name}","releases_url":"https://api.github.com/repos/vivekmenezes/cockroach/releases{/id}","deployments_url":"https://api.github.com/repos/vivekmenezes/cockroach/deployments","created_at":"2015-04-16T20:25:11Z","updated_at":"2016-01-22T03:53:14Z","pushed_at":"2016-04-15T02:56:08Z","git_url":"git://github.com/vivekmenezes/cockroach.git","ssh_url":"git@github.com:vivekmenezes/cockroach.git","clone_url":"https://github.com/vivekmenezes/cockroach.git","svn_url":"https://github.com/vivekmenezes/cockroach","homepage":null,"size":145446,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"cockroachdb:master","ref":"master","sha":"764e86807b622185ebc68a1e0bf0612d628b4848","user":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars.githubusercontent.com/u/6748139?v=3","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"repo":{"id":16563587,"name":"cockroach","full_name":"cockroachdb/cockroach","owner":{"login":"cockroachdb","id":6748139,"avatar_url":"https://avatars.githubusercontent.com/u/6748139?v=3","gravatar_id":"","url":"https://api.github.com/users/cockroachdb","html_url":"https://github.com/cockroachdb","followers_url":"https://api.github.com/users/cockroachdb/followers","following_url":"https://api.github.com/users/cockroachdb/following{/other_user}","gists_url":"https://api.github.com/users/cockroachdb/gists{/gist_id}","starred_url":"https://api.github.com/users/cockroachdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cockroachdb/subscriptions","organizations_url":"https://api.github.com/users/cockroachdb/orgs","repos_url":"https://api.github.com/users/cockroachdb/repos","events_url":"https://api.github.com/users/cockroachdb/events{/privacy}","received_events_url":"https://api.github.com/users/cockroachdb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cockroachdb/cockroach","description":"A Scalable, Survivable, Strongly-Consistent SQL Database","fork":false,"url":"https://api.github.com/repos/cockroachdb/cockroach","forks_url":"https://api.github.com/repos/cockroachdb/cockroach/forks","keys_url":"https://api.github.com/repos/cockroachdb/cockroach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cockroachdb/cockroach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cockroachdb/cockroach/teams","hooks_url":"https://api.github.com/repos/cockroachdb/cockroach/hooks","issue_events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/events{/number}","events_url":"https://api.github.com/repos/cockroachdb/cockroach/events","assignees_url":"https://api.github.com/repos/cockroachdb/cockroach/assignees{/user}","branches_url":"https://api.github.com/repos/cockroachdb/cockroach/branches{/branch}","tags_url":"https://api.github.com/repos/cockroachdb/cockroach/tags","blobs_url":"https://api.github.com/repos/cockroachdb/cockroach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cockroachdb/cockroach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cockroachdb/cockroach/git/refs{/sha}","trees_url":"https://api.github.com/repos/cockroachdb/cockroach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/{sha}","languages_url":"https://api.github.com/repos/cockroachdb/cockroach/languages","stargazers_url":"https://api.github.com/repos/cockroachdb/cockroach/stargazers","contributors_url":"https://api.github.com/repos/cockroachdb/cockroach/contributors","subscribers_url":"https://api.github.com/repos/cockroachdb/cockroach/subscribers","subscription_url":"https://api.github.com/repos/cockroachdb/cockroach/subscription","commits_url":"https://api.github.com/repos/cockroachdb/cockroach/commits{/sha}","git_commits_url":"https://api.github.com/repos/cockroachdb/cockroach/git/commits{/sha}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/comments{/number}","issue_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments{/number}","contents_url":"https://api.github.com/repos/cockroachdb/cockroach/contents/{+path}","compare_url":"https://api.github.com/repos/cockroachdb/cockroach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cockroachdb/cockroach/merges","archive_url":"https://api.github.com/repos/cockroachdb/cockroach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cockroachdb/cockroach/downloads","issues_url":"https://api.github.com/repos/cockroachdb/cockroach/issues{/number}","pulls_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls{/number}","milestones_url":"https://api.github.com/repos/cockroachdb/cockroach/milestones{/number}","notifications_url":"https://api.github.com/repos/cockroachdb/cockroach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/labels{/name}","releases_url":"https://api.github.com/repos/cockroachdb/cockroach/releases{/id}","deployments_url":"https://api.github.com/repos/cockroachdb/cockroach/deployments","created_at":"2014-02-06T00:18:47Z","updated_at":"2016-04-15T02:26:27Z","pushed_at":"2016-04-14T23:40:29Z","git_url":"git://github.com/cockroachdb/cockroach.git","ssh_url":"git@github.com:cockroachdb/cockroach.git","clone_url":"https://github.com/cockroachdb/cockroach.git","svn_url":"https://github.com/cockroachdb/cockroach","homepage":"https://www.cockroachlabs.com","size":185480,"stargazers_count":6681,"watchers_count":6681,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":637,"mirror_url":null,"open_issues_count":405,"forks":637,"open_issues":405,"watchers":6681,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/6072"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/6072"},"issue":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/6072"},"comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/6072/comments"},"review_comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/6072/comments"},"review_comment":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/6072/commits"},"statuses":{"href":"https://api.github.com/repos/cockroachdb/cockroach/statuses/d999098e581d1c4fa400279b9a37b521852f788e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1168,"deletions":483,"changed_files":12}}