{"action":"created","comment":{"url":"https://api.github.com/repos/DataDog/leveldb/pulls/comments/222101912","pull_request_review_id":160911125,"id":222101912,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjEwMTkxMg==","diff_hunk":"@@ -213,6 +215,76 @@ func (db *DB) Get(ro *ReadOptions, key []byte) ([]byte, error) {\n \treturn C.GoBytes(unsafe.Pointer(value), C.int(vallen)), nil\n }\n \n+// GetMany returns the values associated with keys from the database.\n+//\n+// GetMany fills in the entries of values consistent with Get():\n+// - If keys[i] exists in the database with non-zero value, values[i] holds its non-zero len []byte slice.\n+// - If keys[i] does not exist in the database, values[i] == nil.\n+// - If keys[i] does exist, but its value is zero-length, values[i] == []byte{}.\n+// - If there's an error looking up keys[i], values[i] == nil.\n+//\n+// The keys byte slice may be reused safely. Go takes a copy of\n+// them before returning.\n+func (db *DB) GetMany(ro *ReadOptions, keys [][]byte) ([][]byte, []error) {\n+\tif db.closed {\n+\t\tpanic(ErrDBClosed)\n+\t}\n+\tif len(keys) == 0 {\n+\t\treturn nil, nil\n+\t}\n+\n+\tvar packedKeysBuffer bytes.Buffer\n+\tcKeyLens := make([]C.size_t, len(keys))\n+\tfor i := range keys {\n+\t\tpackedKeysBuffer.Write(keys[i])\n+\t\tcKeyLens[i] = C.size_t(len(keys[i]))\n+\t}\n+\tpackedKeysBytes := packedKeysBuffer.Bytes()","path":"db.go","position":38,"original_position":38,"commit_id":"2ebbbc4a3add1cd7bac5a319e242a43f7ae69c0c","original_commit_id":"2ebbbc4a3add1cd7bac5a319e242a43f7ae69c0c","user":{"login":"Viq111","id":2376565,"node_id":"MDQ6VXNlcjIzNzY1NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/2376565?v=4","gravatar_id":"","url":"https://api.github.com/users/Viq111","html_url":"https://github.com/Viq111","followers_url":"https://api.github.com/users/Viq111/followers","following_url":"https://api.github.com/users/Viq111/following{/other_user}","gists_url":"https://api.github.com/users/Viq111/gists{/gist_id}","starred_url":"https://api.github.com/users/Viq111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Viq111/subscriptions","organizations_url":"https://api.github.com/users/Viq111/orgs","repos_url":"https://api.github.com/users/Viq111/repos","events_url":"https://api.github.com/users/Viq111/events{/privacy}","received_events_url":"https://api.github.com/users/Viq111/received_events","type":"User","site_admin":false},"body":"return error if `len(packedKeysBytes)` (if all keys are 0-bytes) ?\r\notherwise you'll panic l.249","created_at":"2018-10-02T20:34:10Z","updated_at":"2018-10-02T20:53:40Z","html_url":"https://github.com/DataDog/leveldb/pull/10#discussion_r222101912","pull_request_url":"https://api.github.com/repos/DataDog/leveldb/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/DataDog/leveldb/pulls/comments/222101912"},"html":{"href":"https://github.com/DataDog/leveldb/pull/10#discussion_r222101912"},"pull_request":{"href":"https://api.github.com/repos/DataDog/leveldb/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/DataDog/leveldb/pulls/10","id":219531551,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NTMxNTUx","html_url":"https://github.com/DataDog/leveldb/pull/10","diff_url":"https://github.com/DataDog/leveldb/pull/10.diff","patch_url":"https://github.com/DataDog/leveldb/pull/10.patch","issue_url":"https://api.github.com/repos/DataDog/leveldb/issues/10","number":10,"state":"open","locked":false,"title":"support leveldb.getmany()","user":{"login":"ethanwp","id":20648848,"node_id":"MDQ6VXNlcjIwNjQ4ODQ4","avatar_url":"https://avatars1.githubusercontent.com/u/20648848?v=4","gravatar_id":"","url":"https://api.github.com/users/ethanwp","html_url":"https://github.com/ethanwp","followers_url":"https://api.github.com/users/ethanwp/followers","following_url":"https://api.github.com/users/ethanwp/following{/other_user}","gists_url":"https://api.github.com/users/ethanwp/gists{/gist_id}","starred_url":"https://api.github.com/users/ethanwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethanwp/subscriptions","organizations_url":"https://api.github.com/users/ethanwp/orgs","repos_url":"https://api.github.com/users/ethanwp/repos","events_url":"https://api.github.com/users/ethanwp/events{/privacy}","received_events_url":"https://api.github.com/users/ethanwp/received_events","type":"User","site_admin":false},"body":"This adds the `GetMany()` API to our forked version of leveldb directly. This should be faster than calling `Get()` in go in a loop as each such call crossing go-to-c-and-back can be expensive in cgo. ","created_at":"2018-10-01T22:11:10Z","updated_at":"2018-10-02T20:53:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d0fd64685ae7a3529fb5a0fb14193ed22c05c83","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DataDog/leveldb/pulls/10/commits","review_comments_url":"https://api.github.com/repos/DataDog/leveldb/pulls/10/comments","review_comment_url":"https://api.github.com/repos/DataDog/leveldb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataDog/leveldb/issues/10/comments","statuses_url":"https://api.github.com/repos/DataDog/leveldb/statuses/2ebbbc4a3add1cd7bac5a319e242a43f7ae69c0c","head":{"label":"DataDog:ethan/leveldb-getmany","ref":"ethan/leveldb-getmany","sha":"2ebbbc4a3add1cd7bac5a319e242a43f7ae69c0c","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":66093652,"node_id":"MDEwOlJlcG9zaXRvcnk2NjA5MzY1Mg==","name":"leveldb","full_name":"DataDog/leveldb","private":false,"owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DataDog/leveldb","description":"Go wrapper for LevelDB. Forked from jmhodges/levigo to remove system LevelDB dependency","fork":true,"url":"https://api.github.com/repos/DataDog/leveldb","forks_url":"https://api.github.com/repos/DataDog/leveldb/forks","keys_url":"https://api.github.com/repos/DataDog/leveldb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/leveldb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/leveldb/teams","hooks_url":"https://api.github.com/repos/DataDog/leveldb/hooks","issue_events_url":"https://api.github.com/repos/DataDog/leveldb/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/leveldb/events","assignees_url":"https://api.github.com/repos/DataDog/leveldb/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/leveldb/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/leveldb/tags","blobs_url":"https://api.github.com/repos/DataDog/leveldb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/leveldb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/leveldb/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/leveldb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/leveldb/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/leveldb/languages","stargazers_url":"https://api.github.com/repos/DataDog/leveldb/stargazers","contributors_url":"https://api.github.com/repos/DataDog/leveldb/contributors","subscribers_url":"https://api.github.com/repos/DataDog/leveldb/subscribers","subscription_url":"https://api.github.com/repos/DataDog/leveldb/subscription","commits_url":"https://api.github.com/repos/DataDog/leveldb/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/leveldb/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/leveldb/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/leveldb/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/leveldb/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/leveldb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/leveldb/merges","archive_url":"https://api.github.com/repos/DataDog/leveldb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/leveldb/downloads","issues_url":"https://api.github.com/repos/DataDog/leveldb/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/leveldb/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/leveldb/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/leveldb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/leveldb/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/leveldb/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/leveldb/deployments","created_at":"2016-08-19T15:46:24Z","updated_at":"2018-09-17T08:30:08Z","pushed_at":"2018-10-02T17:36:19Z","git_url":"git://github.com/DataDog/leveldb.git","ssh_url":"git@github.com:DataDog/leveldb.git","clone_url":"https://github.com/DataDog/leveldb.git","svn_url":"https://github.com/DataDog/leveldb","homepage":"","size":591,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"DataDog:master","ref":"master","sha":"12a0b6e10a5bf779330ed8b7c0f1f39f212d34e2","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":66093652,"node_id":"MDEwOlJlcG9zaXRvcnk2NjA5MzY1Mg==","name":"leveldb","full_name":"DataDog/leveldb","private":false,"owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DataDog/leveldb","description":"Go wrapper for LevelDB. Forked from jmhodges/levigo to remove system LevelDB dependency","fork":true,"url":"https://api.github.com/repos/DataDog/leveldb","forks_url":"https://api.github.com/repos/DataDog/leveldb/forks","keys_url":"https://api.github.com/repos/DataDog/leveldb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/leveldb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/leveldb/teams","hooks_url":"https://api.github.com/repos/DataDog/leveldb/hooks","issue_events_url":"https://api.github.com/repos/DataDog/leveldb/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/leveldb/events","assignees_url":"https://api.github.com/repos/DataDog/leveldb/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/leveldb/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/leveldb/tags","blobs_url":"https://api.github.com/repos/DataDog/leveldb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/leveldb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/leveldb/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/leveldb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/leveldb/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/leveldb/languages","stargazers_url":"https://api.github.com/repos/DataDog/leveldb/stargazers","contributors_url":"https://api.github.com/repos/DataDog/leveldb/contributors","subscribers_url":"https://api.github.com/repos/DataDog/leveldb/subscribers","subscription_url":"https://api.github.com/repos/DataDog/leveldb/subscription","commits_url":"https://api.github.com/repos/DataDog/leveldb/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/leveldb/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/leveldb/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/leveldb/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/leveldb/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/leveldb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/leveldb/merges","archive_url":"https://api.github.com/repos/DataDog/leveldb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/leveldb/downloads","issues_url":"https://api.github.com/repos/DataDog/leveldb/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/leveldb/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/leveldb/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/leveldb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/leveldb/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/leveldb/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/leveldb/deployments","created_at":"2016-08-19T15:46:24Z","updated_at":"2018-09-17T08:30:08Z","pushed_at":"2018-10-02T17:36:19Z","git_url":"git://github.com/DataDog/leveldb.git","ssh_url":"git@github.com:DataDog/leveldb.git","clone_url":"https://github.com/DataDog/leveldb.git","svn_url":"https://github.com/DataDog/leveldb","homepage":"","size":591,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataDog/leveldb/pulls/10"},"html":{"href":"https://github.com/DataDog/leveldb/pull/10"},"issue":{"href":"https://api.github.com/repos/DataDog/leveldb/issues/10"},"comments":{"href":"https://api.github.com/repos/DataDog/leveldb/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/DataDog/leveldb/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/DataDog/leveldb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataDog/leveldb/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/DataDog/leveldb/statuses/2ebbbc4a3add1cd7bac5a319e242a43f7ae69c0c"}},"author_association":"NONE"}}
{"actor":{"display_login":"Viq111"}}