{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/kbfs/pulls/comments/92482511","pull_request_review_id":12997620,"id":92482511,"diff_hunk":"@@ -396,6 +397,75 @@ func (fbo *folderBlockOps) GetBlockForReading(ctx context.Context,\n \t\tNewCommonBlock, false, path{}, blockRead)\n }\n \n+// GetBlocksForReading retrieves the blocks pointed to by ptrs, all of\n+// which must be valid, either from the cache or from the server.  The\n+// returned block may have a generic type (not DirBlock or FileBlock).\n+//\n+// The caller can specify a set of pointers using\n+// `ignoreRecoverableErrors` for which \"recoverable\" fetch errors are\n+// tolerated.  In that case, the returned map will not have an entry\n+// for any pointers in the `ignoreRecoverableErrors` set that hit such\n+// an error.\n+//\n+// This should be called for \"internal\" operations, like conflict\n+// resolution and state checking, which don't know what kind of block\n+// the pointers refer to.  The blocks will not be cached, if they\n+// weren't in the cache already.\n+func (fbo *folderBlockOps) GetBlocksForReading(ctx context.Context,\n+\tlState *lockState, kmd KeyMetadata, ptrs []BlockPointer,\n+\tignoreRecoverableErrors map[BlockPointer]bool,\n+\tbranch BranchName) (map[BlockPointer]Block, error) {\n+\tfbo.blockLock.RLock(lState)\n+\tdefer fbo.blockLock.RUnlock(lState)\n+\n+\ttype resp struct {\n+\t\tptr   BlockPointer\n+\t\tblock Block\n+\t}\n+\n+\trespChans := make([]<-chan resp, 0, len(ptrs))\n+\teg, groupCtx := errgroup.WithContext(ctx)\n+\tfor _, ptr := range ptrs {\n+\t\tptr := ptr\n+\t\trespCh := make(chan resp, 1)\n+\t\trespChans = append(respChans, respCh)\n+\t\teg.Go(func() error {\n+\t\t\tblock, err := fbo.getBlockHelperLocked(groupCtx, nil, kmd, ptr,\n+\t\t\t\tbranch, NewCommonBlock, false, path{}, blockReadParallel)\n+\t\t\t// TODO: we might be able to recover the size of the\n+\t\t\t// top-most block of a removed file using the merged\n+\t\t\t// directory entry, the same way we do in\n+\t\t\t// `folderBranchOps.unrefEntry`.\n+\t\t\tif isRecoverableBlockErrorForRemoval(err) &&","path":"libkbfs/folder_block_ops.go","position":51,"original_position":51,"commit_id":"a8363b287090adec3f52e62f673715a1c9650c78","original_commit_id":"a8363b287090adec3f52e62f673715a1c9650c78","user":{"login":"jzila","id":59594,"avatar_url":"https://avatars.githubusercontent.com/u/59594?v=3","gravatar_id":"","url":"https://api.github.com/users/jzila","html_url":"https://github.com/jzila","followers_url":"https://api.github.com/users/jzila/followers","following_url":"https://api.github.com/users/jzila/following{/other_user}","gists_url":"https://api.github.com/users/jzila/gists{/gist_id}","starred_url":"https://api.github.com/users/jzila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzila/subscriptions","organizations_url":"https://api.github.com/users/jzila/orgs","repos_url":"https://api.github.com/users/jzila/repos","events_url":"https://api.github.com/users/jzila/events{/privacy}","received_events_url":"https://api.github.com/users/jzila/received_events","type":"User","site_admin":false},"body":"shouldn't this be `isRecoverableBlockError`?","created_at":"2016-12-14T20:30:55Z","updated_at":"2016-12-14T20:30:55Z","html_url":"https://github.com/keybase/kbfs/pull/580#discussion_r92482511","pull_request_url":"https://api.github.com/repos/keybase/kbfs/pulls/580","_links":{"self":{"href":"https://api.github.com/repos/keybase/kbfs/pulls/comments/92482511"},"html":{"href":"https://github.com/keybase/kbfs/pull/580#discussion_r92482511"},"pull_request":{"href":"https://api.github.com/repos/keybase/kbfs/pulls/580"}}},"pull_request":{"url":"https://api.github.com/repos/keybase/kbfs/pulls/580","id":98022253,"html_url":"https://github.com/keybase/kbfs/pull/580","diff_url":"https://github.com/keybase/kbfs/pull/580.diff","patch_url":"https://github.com/keybase/kbfs/pull/580.patch","issue_url":"https://api.github.com/repos/keybase/kbfs/issues/580","number":580,"state":"open","locked":false,"title":"cr: fetch ref and unref blocks in parallel","user":{"login":"strib","id":8516691,"avatar_url":"https://avatars.githubusercontent.com/u/8516691?v=3","gravatar_id":"","url":"https://api.github.com/users/strib","html_url":"https://github.com/strib","followers_url":"https://api.github.com/users/strib/followers","following_url":"https://api.github.com/users/strib/following{/other_user}","gists_url":"https://api.github.com/users/strib/gists{/gist_id}","starred_url":"https://api.github.com/users/strib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strib/subscriptions","organizations_url":"https://api.github.com/users/strib/orgs","repos_url":"https://api.github.com/users/strib/repos","events_url":"https://api.github.com/users/strib/events{/privacy}","received_events_url":"https://api.github.com/users/strib/received_events","type":"User","site_admin":false},"body":"If conflict resolution has to fetch a lot of blocks to do block accounting, it's best to fetch them in parallel to make it as fast as possible.\r\n\r\nNote that once #579 goes in, this won't be as big an issue when journaling is enabled since all of referenced blocks should be locally available on disk.  However, the unref'd blocks still may be getting fetched from the remote server.\r\n\r\n+@jzila as a reviewer since it involves block fetching.","created_at":"2016-12-14T19:46:32Z","updated_at":"2016-12-14T20:35:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6aa3904e0ad721d4023c82f8c4e9c94ec5010204","assignee":{"login":"jzila","id":59594,"avatar_url":"https://avatars.githubusercontent.com/u/59594?v=3","gravatar_id":"","url":"https://api.github.com/users/jzila","html_url":"https://github.com/jzila","followers_url":"https://api.github.com/users/jzila/followers","following_url":"https://api.github.com/users/jzila/following{/other_user}","gists_url":"https://api.github.com/users/jzila/gists{/gist_id}","starred_url":"https://api.github.com/users/jzila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzila/subscriptions","organizations_url":"https://api.github.com/users/jzila/orgs","repos_url":"https://api.github.com/users/jzila/repos","events_url":"https://api.github.com/users/jzila/events{/privacy}","received_events_url":"https://api.github.com/users/jzila/received_events","type":"User","site_admin":false},"assignees":[{"login":"jzila","id":59594,"avatar_url":"https://avatars.githubusercontent.com/u/59594?v=3","gravatar_id":"","url":"https://api.github.com/users/jzila","html_url":"https://github.com/jzila","followers_url":"https://api.github.com/users/jzila/followers","following_url":"https://api.github.com/users/jzila/following{/other_user}","gists_url":"https://api.github.com/users/jzila/gists{/gist_id}","starred_url":"https://api.github.com/users/jzila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzila/subscriptions","organizations_url":"https://api.github.com/users/jzila/orgs","repos_url":"https://api.github.com/users/jzila/repos","events_url":"https://api.github.com/users/jzila/events{/privacy}","received_events_url":"https://api.github.com/users/jzila/received_events","type":"User","site_admin":false},{"login":"akalin-keybase","id":13270622,"avatar_url":"https://avatars.githubusercontent.com/u/13270622?v=3","gravatar_id":"","url":"https://api.github.com/users/akalin-keybase","html_url":"https://github.com/akalin-keybase","followers_url":"https://api.github.com/users/akalin-keybase/followers","following_url":"https://api.github.com/users/akalin-keybase/following{/other_user}","gists_url":"https://api.github.com/users/akalin-keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/akalin-keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akalin-keybase/subscriptions","organizations_url":"https://api.github.com/users/akalin-keybase/orgs","repos_url":"https://api.github.com/users/akalin-keybase/repos","events_url":"https://api.github.com/users/akalin-keybase/events{/privacy}","received_events_url":"https://api.github.com/users/akalin-keybase/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/keybase/kbfs/pulls/580/commits","review_comments_url":"https://api.github.com/repos/keybase/kbfs/pulls/580/comments","review_comment_url":"https://api.github.com/repos/keybase/kbfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/kbfs/issues/580/comments","statuses_url":"https://api.github.com/repos/keybase/kbfs/statuses/a8363b287090adec3f52e62f673715a1c9650c78","head":{"label":"keybase:strib/KBFS-1777-cr-fetch-blocks-in-parallel","ref":"strib/KBFS-1777-cr-fetch-blocks-in-parallel","sha":"a8363b287090adec3f52e62f673715a1c9650c78","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":59787605,"name":"kbfs","full_name":"keybase/kbfs","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/kbfs","description":"Keybase Filesystem (KBFS)","fork":false,"url":"https://api.github.com/repos/keybase/kbfs","forks_url":"https://api.github.com/repos/keybase/kbfs/forks","keys_url":"https://api.github.com/repos/keybase/kbfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/kbfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/kbfs/teams","hooks_url":"https://api.github.com/repos/keybase/kbfs/hooks","issue_events_url":"https://api.github.com/repos/keybase/kbfs/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/kbfs/events","assignees_url":"https://api.github.com/repos/keybase/kbfs/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/kbfs/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/kbfs/tags","blobs_url":"https://api.github.com/repos/keybase/kbfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/kbfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/kbfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/kbfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/kbfs/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/kbfs/languages","stargazers_url":"https://api.github.com/repos/keybase/kbfs/stargazers","contributors_url":"https://api.github.com/repos/keybase/kbfs/contributors","subscribers_url":"https://api.github.com/repos/keybase/kbfs/subscribers","subscription_url":"https://api.github.com/repos/keybase/kbfs/subscription","commits_url":"https://api.github.com/repos/keybase/kbfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/kbfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/kbfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/kbfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/kbfs/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/kbfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/kbfs/merges","archive_url":"https://api.github.com/repos/keybase/kbfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/kbfs/downloads","issues_url":"https://api.github.com/repos/keybase/kbfs/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/kbfs/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/kbfs/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/kbfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/kbfs/labels{/name}","releases_url":"https://api.github.com/repos/keybase/kbfs/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/kbfs/deployments","created_at":"2016-05-26T22:37:42Z","updated_at":"2016-12-14T13:00:42Z","pushed_at":"2016-12-14T19:46:32Z","git_url":"git://github.com/keybase/kbfs.git","ssh_url":"git@github.com:keybase/kbfs.git","clone_url":"https://github.com/keybase/kbfs.git","svn_url":"https://github.com/keybase/kbfs","homepage":"https://keybase.io/docs/kbfs","size":36311,"stargazers_count":271,"watchers_count":271,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":31,"forks":32,"open_issues":31,"watchers":271,"default_branch":"master"}},"base":{"label":"keybase:strib/KBFS-1761-recoverable-errors-in-cr-rms","ref":"strib/KBFS-1761-recoverable-errors-in-cr-rms","sha":"a9e8ab98aadf248711c60e1371fba9726e6f3fe5","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":59787605,"name":"kbfs","full_name":"keybase/kbfs","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/kbfs","description":"Keybase Filesystem (KBFS)","fork":false,"url":"https://api.github.com/repos/keybase/kbfs","forks_url":"https://api.github.com/repos/keybase/kbfs/forks","keys_url":"https://api.github.com/repos/keybase/kbfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/kbfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/kbfs/teams","hooks_url":"https://api.github.com/repos/keybase/kbfs/hooks","issue_events_url":"https://api.github.com/repos/keybase/kbfs/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/kbfs/events","assignees_url":"https://api.github.com/repos/keybase/kbfs/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/kbfs/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/kbfs/tags","blobs_url":"https://api.github.com/repos/keybase/kbfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/kbfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/kbfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/kbfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/kbfs/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/kbfs/languages","stargazers_url":"https://api.github.com/repos/keybase/kbfs/stargazers","contributors_url":"https://api.github.com/repos/keybase/kbfs/contributors","subscribers_url":"https://api.github.com/repos/keybase/kbfs/subscribers","subscription_url":"https://api.github.com/repos/keybase/kbfs/subscription","commits_url":"https://api.github.com/repos/keybase/kbfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/kbfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/kbfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/kbfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/kbfs/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/kbfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/kbfs/merges","archive_url":"https://api.github.com/repos/keybase/kbfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/kbfs/downloads","issues_url":"https://api.github.com/repos/keybase/kbfs/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/kbfs/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/kbfs/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/kbfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/kbfs/labels{/name}","releases_url":"https://api.github.com/repos/keybase/kbfs/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/kbfs/deployments","created_at":"2016-05-26T22:37:42Z","updated_at":"2016-12-14T13:00:42Z","pushed_at":"2016-12-14T19:46:32Z","git_url":"git://github.com/keybase/kbfs.git","ssh_url":"git@github.com:keybase/kbfs.git","clone_url":"https://github.com/keybase/kbfs.git","svn_url":"https://github.com/keybase/kbfs","homepage":"https://keybase.io/docs/kbfs","size":36311,"stargazers_count":271,"watchers_count":271,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":31,"forks":32,"open_issues":31,"watchers":271,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/kbfs/pulls/580"},"html":{"href":"https://github.com/keybase/kbfs/pull/580"},"issue":{"href":"https://api.github.com/repos/keybase/kbfs/issues/580"},"comments":{"href":"https://api.github.com/repos/keybase/kbfs/issues/580/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/kbfs/pulls/580/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/kbfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/kbfs/pulls/580/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/kbfs/statuses/a8363b287090adec3f52e62f673715a1c9650c78"}}}}
{"actor":{"display_login":"jzila"}}