{"action":"created","comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments/58963889","id":58963889,"diff_hunk":"@@ -0,0 +1,459 @@\n+// Copyright 2016 The Cockroach Authors.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n+// implied. See the License for the specific language governing\n+// permissions and limitations under the License.\n+//\n+// Author: Spencer Kimball (spencer@cockroachlabs.com)\n+\n+package sql_test\n+\n+import (\n+\t\"bytes\"\n+\t\"database/sql\"\n+\t\"fmt\"\n+\t\"testing\"\n+\n+\t\"github.com/cockroachdb/cockroach/client\"\n+\t\"github.com/cockroachdb/cockroach/roachpb\"\n+\t\"github.com/cockroachdb/cockroach/security\"\n+\t\"github.com/cockroachdb/cockroach/server\"\n+\t\"github.com/cockroachdb/cockroach/testutils/sqlutils\"\n+\t\"github.com/cockroachdb/cockroach/util\"\n+\t\"github.com/cockroachdb/cockroach/util/tracing\"\n+)\n+\n+type keyValue struct {\n+\tkey   []byte\n+\tvalue []byte\n+}\n+\n+type kvInterface interface {\n+\tinsert(rows, run int) error\n+\tupdate(rows, run int) error\n+\tdel(rows, run int) error\n+\tscan(rows, run int) error\n+\n+\tprep(rows int, initData bool) error\n+\tdone()\n+}\n+\n+// kvNative uses the native client package to implement kvInterface.\n+type kvNative struct {\n+\tdb     *client.DB\n+\tepoch  int\n+\tprefix string\n+\tdoneFn func()\n+}\n+\n+func newKVNative(b *testing.B) kvInterface {\n+\tenableTracing := tracing.Disable()\n+\ts := server.StartTestServer(b)\n+\n+\treturn &kvNative{\n+\t\tdb: s.DB(),\n+\t\tdoneFn: func() {\n+\t\t\ts.Stop()\n+\t\t\tenableTracing()\n+\t\t},\n+\t}\n+}\n+\n+func (kv *kvNative) insert(rows, run int) error {\n+\tfirstRow := rows * run\n+\tlastRow := rows * (run + 1)\n+\tpErr := kv.db.Txn(func(txn *client.Txn) *roachpb.Error {\n+\t\tb := txn.NewBatch()\n+\t\tfor i := firstRow; i < lastRow; i++ {\n+\t\t\tb.Put(fmt.Sprintf(\"%s%06d\", kv.prefix, i), i)\n+\t\t}\n+\t\treturn txn.Run(b)\n+\t})\n+\treturn pErr.GoError()\n+}\n+\n+func (kv *kvNative) update(rows, run int) error {\n+\tpErr := kv.db.Txn(func(txn *client.Txn) *roachpb.Error {\n+\t\t// Read all values in a batch.\n+\t\tb := txn.NewBatch()\n+\t\tfor i := 0; i < rows; i++ {\n+\t\t\tb.Get(fmt.Sprintf(\"%s%06d\", kv.prefix, i))\n+\t\t}\n+\t\tif pErr := txn.Run(b); pErr != nil {\n+\t\t\treturn pErr\n+\t\t}\n+\t\t// Now add one to each value and add as puts to write batch.\n+\t\twb := txn.NewBatch()\n+\t\tfor i, result := range b.Results {\n+\t\t\tv := result.Rows[0].ValueInt()\n+\t\t\twb.Put(fmt.Sprintf(\"%s%06d\", kv.prefix, i), v+1)\n+\t\t}\n+\t\tif pErr := txn.Run(wb); pErr != nil {\n+\t\t\treturn pErr\n+\t\t}\n+\t\treturn nil\n+\t})\n+\treturn pErr.GoError()\n+}\n+\n+func (kv *kvNative) del(rows, run int) error {\n+\tpErr := kv.db.Txn(func(txn *client.Txn) *roachpb.Error {\n+\t\tb := txn.NewBatch()\n+\t\tfor i := 0; i < rows; i++ {\n+\t\t\tb.Del(fmt.Sprintf(\"%s%06d\", kv.prefix, i))\n+\t\t}\n+\t\treturn txn.Run(b)\n+\t})\n+\treturn pErr.GoError()\n+}\n+\n+func (kv *kvNative) scan(rows, run int) error {\n+\tpErr := kv.db.Txn(func(txn *client.Txn) *roachpb.Error {\n+\t\tkvs, pErr := txn.Scan(fmt.Sprintf(\"%s%06d\", kv.prefix, 0), fmt.Sprintf(\"%s%06d\", kv.prefix, rows), int64(rows))\n+\t\tif len(kvs) != rows {\n+\t\t\treturn roachpb.NewErrorf(\"expected %d rows; got %d\", rows, len(kvs))\n+\t\t}\n+\t\treturn pErr\n+\t})\n+\treturn pErr.GoError()\n+}\n+\n+func (kv *kvNative) prep(rows int, initData bool) error {\n+\tkv.epoch++\n+\tkv.prefix = fmt.Sprintf(\"%d/\", kv.epoch)\n+\tif !initData {\n+\t\treturn nil\n+\t}\n+\tpErr := kv.db.Txn(func(txn *client.Txn) *roachpb.Error {\n+\t\tb := txn.NewBatch()\n+\t\tfor i := 0; i < rows; i++ {\n+\t\t\tb.Put(fmt.Sprintf(\"%s%06d\", kv.prefix, i), i)\n+\t\t}\n+\t\treturn txn.Run(b)\n+\t})\n+\treturn pErr.GoError()\n+}\n+\n+func (kv *kvNative) done() {\n+\tkv.doneFn()\n+}\n+\n+// kvSQL is a SQL-based implementation of the KV interface.\n+type kvSQL struct {\n+\tdb     *sql.DB\n+\tdoneFn func()\n+}\n+\n+func newKVSQL(b *testing.B) kvInterface {\n+\tenableTracing := tracing.Disable()\n+\ts := server.StartTestServer(b)\n+\tpgURL, cleanupURL := sqlutils.PGUrl(b, s, security.RootUser, \"benchmarkCockroach\")\n+\tpgURL.Path = \"bench\"\n+\tdb, err := sql.Open(\"postgres\", pgURL.String())\n+\tif err != nil {\n+\t\tb.Fatal(err)\n+\t}\n+\tif _, err := db.Exec(`CREATE DATABASE IF NOT EXISTS bench`); err != nil {\n+\t\tb.Fatal(err)\n+\t}\n+\n+\tkv := &kvSQL{}\n+\tkv.db = db\n+\tkv.doneFn = func() {\n+\t\tdb.Close()\n+\t\tcleanupURL()\n+\t\ts.Stop()\n+\t\tenableTracing()\n+\t}\n+\treturn kv\n+}\n+\n+func (kv *kvSQL) insert(rows, run int) error {\n+\tfirstRow := rows * run\n+\tvar buf bytes.Buffer\n+\tbuf.WriteString(`INSERT INTO bench.kv VALUES `)\n+\tfor i := 0; i < rows; i++ {\n+\t\tif i > 0 {\n+\t\t\tbuf.WriteString(\", \")\n+\t\t}\n+\t\tfmt.Fprintf(&buf, \"('%06d', %d)\", i+firstRow, i)\n+\t}\n+\t_, err := kv.db.Exec(buf.String())\n+\treturn err\n+}\n+\n+func (kv *kvSQL) update(rows, run int) error {\n+\tvar buf bytes.Buffer\n+\tbuf.WriteString(`UPDATE bench.kv SET v = v + 1 WHERE k IN (`)\n+\tfor j := 0; j < rows; j++ {\n+\t\tif j > 0 {\n+\t\t\tbuf.WriteString(\", \")\n+\t\t}\n+\t\tfmt.Fprintf(&buf, `'%06d'`, j)\n+\t}\n+\tbuf.WriteString(`)`)\n+\t_, err := kv.db.Exec(buf.String())\n+\treturn err\n+}\n+\n+func (kv *kvSQL) del(rows, run int) error {\n+\tvar buf bytes.Buffer\n+\tbuf.WriteString(`DELETE FROM bench.kv WHERE k IN (`)\n+\tfor j := 0; j < rows; j++ {\n+\t\tif j > 0 {\n+\t\t\tbuf.WriteString(\", \")\n+\t\t}\n+\t\tfmt.Fprintf(&buf, `'%06d'`, j)\n+\t}\n+\tbuf.WriteString(`)`)\n+\t_, err := kv.db.Exec(buf.String())\n+\treturn err\n+}\n+\n+func (kv *kvSQL) scan(count, run int) error {\n+\trows, err := kv.db.Query(fmt.Sprintf(\"SELECT * FROM bench.kv LIMIT %d\", count))\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\tn := 0\n+\tfor rows.Next() {\n+\t\tn++\n+\t}\n+\trows.Close()\n+\tif err := rows.Err(); err != nil {\n+\t\treturn err\n+\t}\n+\tif n != count {\n+\t\treturn util.Errorf(\"unexpected result count: %d (expected %d)\", n, count)\n+\t}\n+\treturn nil\n+}\n+\n+func (kv *kvSQL) prep(rows int, initData bool) error {\n+\tif _, err := kv.db.Exec(`DROP TABLE IF EXISTS bench.kv`); err != nil {\n+\t\treturn err\n+\t}\n+\tif _, err := kv.db.Exec(`CREATE TABLE IF NOT EXISTS bench.kv (k STRING PRIMARY KEY, v INT)`); err != nil {","path":"sql/kv_test.go","position":244,"original_position":244,"commit_id":"1ab8ac2c73ba075c756dcb89382758067cc08aad","original_commit_id":"19be794ed2ea040a4cb78fc326426438d81fb468","user":{"login":"bdarnell","id":160562,"avatar_url":"https://avatars.githubusercontent.com/u/160562?v=3","gravatar_id":"","url":"https://api.github.com/users/bdarnell","html_url":"https://github.com/bdarnell","followers_url":"https://api.github.com/users/bdarnell/followers","following_url":"https://api.github.com/users/bdarnell/following{/other_user}","gists_url":"https://api.github.com/users/bdarnell/gists{/gist_id}","starred_url":"https://api.github.com/users/bdarnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdarnell/subscriptions","organizations_url":"https://api.github.com/users/bdarnell/orgs","repos_url":"https://api.github.com/users/bdarnell/repos","events_url":"https://api.github.com/users/bdarnell/events{/privacy}","received_events_url":"https://api.github.com/users/bdarnell/received_events","type":"User","site_admin":false},"body":"Removing the limitation on `UPDATE` of PK columns would still leave SQL `UPDATE` slower than a raw KV update. It would be better to identify cases in which the sentinel row is unnecessary (e.g. if all non-PK columns are `NOT NULL`)","created_at":"2016-04-07T23:55:57Z","updated_at":"2016-04-07T23:55:57Z","html_url":"https://github.com/cockroachdb/cockroach/pull/5931#discussion_r58963889","pull_request_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/5931","_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments/58963889"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/5931#discussion_r58963889"},"pull_request":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/5931"}}},"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/5931","id":65680469,"html_url":"https://github.com/cockroachdb/cockroach/pull/5931","diff_url":"https://github.com/cockroachdb/cockroach/pull/5931.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/5931.patch","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5931","number":5931,"state":"open","locked":false,"title":"Benchmarks to answer: \"how much overhead is SQL vs native KV?\"","user":{"login":"spencerkimball","id":6147149,"avatar_url":"https://avatars.githubusercontent.com/u/6147149?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerkimball","html_url":"https://github.com/spencerkimball","followers_url":"https://api.github.com/users/spencerkimball/followers","following_url":"https://api.github.com/users/spencerkimball/following{/other_user}","gists_url":"https://api.github.com/users/spencerkimball/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerkimball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerkimball/subscriptions","organizations_url":"https://api.github.com/users/spencerkimball/orgs","repos_url":"https://api.github.com/users/spencerkimball/repos","events_url":"https://api.github.com/users/spencerkimball/events{/privacy}","received_events_url":"https://api.github.com/users/spencerkimball/received_events","type":"User","site_admin":false},"body":"Note these results are on my laptop, so take with a grain of salt.\r\n```\r\nBenchmarkKVInsert1_Native-4    \t    2000\t    839340 ns/op\r\nBenchmarkKVInsert1_SQL-4       \t    2000\t    649759 ns/op\r\nBenchmarkKVInsert10_Native-4   \t    2000\t   1099658 ns/op\r\nBenchmarkKVInsert10_SQL-4      \t    1000\t   1302572 ns/op\r\nBenchmarkKVInsert100_Native-4  \t     500\t   3374758 ns/op\r\nBenchmarkKVInsert100_SQL-4     \t     200\t   6999272 ns/op\r\nBenchmarkKVInsert1000_Native-4 \t      50\t  25849605 ns/op\r\nBenchmarkKVInsert1000_SQL-4    \t      20\t  72150309 ns/op\r\nBenchmarkKVInsert10000_Native-4\t       5\t 299836340 ns/op\r\nBenchmarkKVInsert10000_SQL-4   \t       1\t1045935749 ns/op\r\nBenchmarkKVUpdate1_Native-4    \t    2000\t   1143479 ns/op\r\nBenchmarkKVUpdate1_SQL-4       \t    2000\t   1006438 ns/op\r\nBenchmarkKVUpdate10_Native-4   \t    1000\t   1596340 ns/op\r\nBenchmarkKVUpdate10_SQL-4      \t    1000\t   1668788 ns/op\r\nBenchmarkKVUpdate100_Native-4  \t     300\t   5699316 ns/op\r\nBenchmarkKVUpdate100_SQL-4     \t     200\t   7261698 ns/op\r\nBenchmarkKVUpdate1000_Native-4 \t      30\t  45377174 ns/op\r\nBenchmarkKVUpdate1000_SQL-4    \t      30\t  63683670 ns/op\r\nBenchmarkKVUpdate10000_Native-4\t       2\t 505973716 ns/op\r\nBenchmarkKVUpdate10000_SQL-4   \t       2\t 745406160 ns/op\r\nBenchmarkKVDelete1_Native-4    \t    2000\t    853446 ns/op\r\nBenchmarkKVDelete1_SQL-4       \t    2000\t    674473 ns/op\r\nBenchmarkKVDelete10_Native-4   \t    2000\t   1126234 ns/op\r\nBenchmarkKVDelete10_SQL-4      \t    2000\t   1045536 ns/op\r\nBenchmarkKVDelete100_Native-4  \t     500\t   3686083 ns/op\r\nBenchmarkKVDelete100_SQL-4     \t     300\t   4100471 ns/op\r\nBenchmarkKVDelete1000_Native-4 \t     100\t  30876116 ns/op\r\nBenchmarkKVDelete1000_SQL-4    \t      50\t  35879515 ns/op\r\nBenchmarkKVDelete10000_Native-4\t       5\t 298790199 ns/op\r\nBenchmarkKVDelete10000_SQL-4   \t       2\t 619428898 ns/op\r\nBenchmarkKVScan1_Native-4      \t    5000\t    290198 ns/op\r\nBenchmarkKVScan1_SQL-4         \t    5000\t    415768 ns/op\r\nBenchmarkKVScan10_Native-4     \t    5000\t    327269 ns/op\r\nBenchmarkKVScan10_SQL-4        \t    3000\t    511777 ns/op\r\nBenchmarkKVScan100_Native-4    \t    2000\t    611106 ns/op\r\nBenchmarkKVScan100_SQL-4       \t    1000\t   1329626 ns/op\r\nBenchmarkKVScan1000_Native-4   \t     500\t   3263260 ns/op\r\nBenchmarkKVScan1000_SQL-4      \t     200\t   8956545 ns/op\r\nBenchmarkKVScan10000_Native-4  \t      50\t  33765755 ns/op\r\nBenchmarkKVScan10000_SQL-4     \t      20\t  87925350 ns/op\r\n```\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cockroachdb/cockroach/5931)\n<!-- Reviewable:end -->\n","created_at":"2016-04-07T18:52:46Z","updated_at":"2016-04-07T23:55:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"669aff21056f46a67f1083963620e29ede9f4902","assignee":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars.githubusercontent.com/u/6201335?v=3","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/5931/commits","review_comments_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/5931/comments","review_comment_url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5931/comments","statuses_url":"https://api.github.com/repos/cockroachdb/cockroach/statuses/1ab8ac2c73ba075c756dcb89382758067cc08aad","head":{"label":"cockroachdb:spencerkimball/kv-benchmarks","ref":"spencerkimball/kv-benchmarks","sha":"1ab8ac2c73ba075c756dcb89382758067cc08aad","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-07T23:48:22Z","pushed_at":"2016-04-07T23:13:12Z","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":177597,"stargazers_count":6651,"watchers_count":6651,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":627,"mirror_url":null,"open_issues_count":365,"forks":627,"open_issues":365,"watchers":6651,"default_branch":"master"}},"base":{"label":"cockroachdb:master","ref":"master","sha":"2c9222e29e2e4c39f0ecfd8c88a8b5656a962692","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-07T23:48:22Z","pushed_at":"2016-04-07T23:13:12Z","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":177597,"stargazers_count":6651,"watchers_count":6651,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":627,"mirror_url":null,"open_issues_count":365,"forks":627,"open_issues":365,"watchers":6651,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/5931"},"html":{"href":"https://github.com/cockroachdb/cockroach/pull/5931"},"issue":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/5931"},"comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/issues/5931/comments"},"review_comments":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/5931/comments"},"review_comment":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cockroachdb/cockroach/pulls/5931/commits"},"statuses":{"href":"https://api.github.com/repos/cockroachdb/cockroach/statuses/1ab8ac2c73ba075c756dcb89382758067cc08aad"}}}}