{"action":"created","comment":{"url":"https://api.github.com/repos/google/trillian/pulls/comments/70810318","id":70810318,"diff_hunk":"@@ -287,46 +288,58 @@ func testSparseTreeFetches(t *testing.T, vec sparseTestVector) {\n \tconst rev = 100\n \tw, tx := getSparseMerkleTreeWriterWithMockTX(rev)\n \n-\te := make(map[string]string)\n+\treads := make(map[string]string)\n+\treadMutex := sync.Mutex{}\n \tleafNodeIDs := make([]storage.NodeID, 0)\n-\t// calculate the set of expected node reads.\n-\tfor i, kv := range vec.kv {\n-\t\tkeyHash := w.hasher.keyHasher([]byte(kv.k))\n-\t\tnodeID := storage.NewNodeIDFromHash(keyHash)\n-\t\tleafNodeIDs = append(leafNodeIDs, nodeID)\n-\t\tsibs := nodeID.Siblings()\n-\t\tt.Logf(\"hash %d: %s\", i, nodeID.String())\n-\n-\t\t// start with the set of siblings of all leaves:\n-\t\tfor j := range sibs {\n-\t\t\tj := j\n-\t\t\tid := sibs[j].String()\n-\t\t\tpathNode := nodeID.String()[:len(id)]\n-\t\t\tif _, ok := e[pathNode]; ok {\n-\t\t\t\t// we're modifying both children of a node because two keys are\n-\t\t\t\t// intersecting, since both will be recalculated neither will be read\n-\t\t\t\t// from storage so we remove the previously set expectation for this\n-\t\t\t\t// node's sibling, and skip adding one for this node:\n-\t\t\t\tdelete(e, pathNode)\n-\t\t\t\tcontinue\n+\n+\t{\n+\t\treadMutex.Lock()\n+\n+\t\t// calculate the set of expected node reads.","path":"merkle/sparse_merkle_tree_test.go","position":40,"original_position":40,"commit_id":"f69c03aa5e94c3a410d80e4236fda85f5a44f815","original_commit_id":"f69c03aa5e94c3a410d80e4236fda85f5a44f815","user":{"login":"AlCutter","id":7648032,"avatar_url":"https://avatars.githubusercontent.com/u/7648032?v=3","gravatar_id":"","url":"https://api.github.com/users/AlCutter","html_url":"https://github.com/AlCutter","followers_url":"https://api.github.com/users/AlCutter/followers","following_url":"https://api.github.com/users/AlCutter/following{/other_user}","gists_url":"https://api.github.com/users/AlCutter/gists{/gist_id}","starred_url":"https://api.github.com/users/AlCutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlCutter/subscriptions","organizations_url":"https://api.github.com/users/AlCutter/orgs","repos_url":"https://api.github.com/users/AlCutter/repos","events_url":"https://api.github.com/users/AlCutter/events{/privacy}","received_events_url":"https://api.github.com/users/AlCutter/received_events","type":"User","site_admin":false},"body":"Yeah, but actually I'm glad we went this way - it's tedious but I know for realz that this sets the expected nodes and only those ones - this actually helped me catch a bug.","created_at":"2016-07-14T14:04:31Z","updated_at":"2016-07-14T14:04:31Z","html_url":"https://github.com/google/trillian/pull/72#discussion_r70810318","pull_request_url":"https://api.github.com/repos/google/trillian/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/google/trillian/pulls/comments/70810318"},"html":{"href":"https://github.com/google/trillian/pull/72#discussion_r70810318"},"pull_request":{"href":"https://api.github.com/repos/google/trillian/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/google/trillian/pulls/72","id":77441083,"html_url":"https://github.com/google/trillian/pull/72","diff_url":"https://github.com/google/trillian/pull/72.diff","patch_url":"https://github.com/google/trillian/pull/72.patch","issue_url":"https://api.github.com/repos/google/trillian/issues/72","number":72,"state":"open","locked":false,"title":"Add testing for expected SMT writes too","user":{"login":"AlCutter","id":7648032,"avatar_url":"https://avatars.githubusercontent.com/u/7648032?v=3","gravatar_id":"","url":"https://api.github.com/users/AlCutter","html_url":"https://github.com/AlCutter","followers_url":"https://api.github.com/users/AlCutter/followers","following_url":"https://api.github.com/users/AlCutter/following{/other_user}","gists_url":"https://api.github.com/users/AlCutter/gists{/gist_id}","starred_url":"https://api.github.com/users/AlCutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlCutter/subscriptions","organizations_url":"https://api.github.com/users/AlCutter/orgs","repos_url":"https://api.github.com/users/AlCutter/repos","events_url":"https://api.github.com/users/AlCutter/events{/privacy}","received_events_url":"https://api.github.com/users/AlCutter/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-14T11:32:08Z","updated_at":"2016-07-14T14:04:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ca4c5b55cea30477e29f63d897ef0cbf7c3e2fe","assignee":{"login":"Martin2112","id":13366863,"avatar_url":"https://avatars.githubusercontent.com/u/13366863?v=3","gravatar_id":"","url":"https://api.github.com/users/Martin2112","html_url":"https://github.com/Martin2112","followers_url":"https://api.github.com/users/Martin2112/followers","following_url":"https://api.github.com/users/Martin2112/following{/other_user}","gists_url":"https://api.github.com/users/Martin2112/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2112/subscriptions","organizations_url":"https://api.github.com/users/Martin2112/orgs","repos_url":"https://api.github.com/users/Martin2112/repos","events_url":"https://api.github.com/users/Martin2112/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2112/received_events","type":"User","site_admin":false},"assignees":[{"login":"Martin2112","id":13366863,"avatar_url":"https://avatars.githubusercontent.com/u/13366863?v=3","gravatar_id":"","url":"https://api.github.com/users/Martin2112","html_url":"https://github.com/Martin2112","followers_url":"https://api.github.com/users/Martin2112/followers","following_url":"https://api.github.com/users/Martin2112/following{/other_user}","gists_url":"https://api.github.com/users/Martin2112/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2112/subscriptions","organizations_url":"https://api.github.com/users/Martin2112/orgs","repos_url":"https://api.github.com/users/Martin2112/repos","events_url":"https://api.github.com/users/Martin2112/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2112/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/google/trillian/milestones/3","html_url":"https://github.com/google/trillian/milestones/Map%20M2","labels_url":"https://api.github.com/repos/google/trillian/milestones/3/labels","id":1850242,"number":3,"title":"Map M2","description":"Map Server using GRPC supporting get key / value and inclusion proof, get SMH and \"commit to revision N+1\"\r\n","creator":{"login":"Martin2112","id":13366863,"avatar_url":"https://avatars.githubusercontent.com/u/13366863?v=3","gravatar_id":"","url":"https://api.github.com/users/Martin2112","html_url":"https://github.com/Martin2112","followers_url":"https://api.github.com/users/Martin2112/followers","following_url":"https://api.github.com/users/Martin2112/following{/other_user}","gists_url":"https://api.github.com/users/Martin2112/gists{/gist_id}","starred_url":"https://api.github.com/users/Martin2112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martin2112/subscriptions","organizations_url":"https://api.github.com/users/Martin2112/orgs","repos_url":"https://api.github.com/users/Martin2112/repos","events_url":"https://api.github.com/users/Martin2112/events{/privacy}","received_events_url":"https://api.github.com/users/Martin2112/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2016-06-27T11:28:17Z","updated_at":"2016-07-14T11:32:08Z","due_on":"2016-07-30T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/google/trillian/pulls/72/commits","review_comments_url":"https://api.github.com/repos/google/trillian/pulls/72/comments","review_comment_url":"https://api.github.com/repos/google/trillian/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/trillian/issues/72/comments","statuses_url":"https://api.github.com/repos/google/trillian/statuses/f69c03aa5e94c3a410d80e4236fda85f5a44f815","head":{"label":"AlCutter:smt_write_test","ref":"smt_write_test","sha":"f69c03aa5e94c3a410d80e4236fda85f5a44f815","user":{"login":"AlCutter","id":7648032,"avatar_url":"https://avatars.githubusercontent.com/u/7648032?v=3","gravatar_id":"","url":"https://api.github.com/users/AlCutter","html_url":"https://github.com/AlCutter","followers_url":"https://api.github.com/users/AlCutter/followers","following_url":"https://api.github.com/users/AlCutter/following{/other_user}","gists_url":"https://api.github.com/users/AlCutter/gists{/gist_id}","starred_url":"https://api.github.com/users/AlCutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlCutter/subscriptions","organizations_url":"https://api.github.com/users/AlCutter/orgs","repos_url":"https://api.github.com/users/AlCutter/repos","events_url":"https://api.github.com/users/AlCutter/events{/privacy}","received_events_url":"https://api.github.com/users/AlCutter/received_events","type":"User","site_admin":false},"repo":{"id":60775946,"name":"trillian","full_name":"AlCutter/trillian","owner":{"login":"AlCutter","id":7648032,"avatar_url":"https://avatars.githubusercontent.com/u/7648032?v=3","gravatar_id":"","url":"https://api.github.com/users/AlCutter","html_url":"https://github.com/AlCutter","followers_url":"https://api.github.com/users/AlCutter/followers","following_url":"https://api.github.com/users/AlCutter/following{/other_user}","gists_url":"https://api.github.com/users/AlCutter/gists{/gist_id}","starred_url":"https://api.github.com/users/AlCutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlCutter/subscriptions","organizations_url":"https://api.github.com/users/AlCutter/orgs","repos_url":"https://api.github.com/users/AlCutter/repos","events_url":"https://api.github.com/users/AlCutter/events{/privacy}","received_events_url":"https://api.github.com/users/AlCutter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlCutter/trillian","description":null,"fork":true,"url":"https://api.github.com/repos/AlCutter/trillian","forks_url":"https://api.github.com/repos/AlCutter/trillian/forks","keys_url":"https://api.github.com/repos/AlCutter/trillian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlCutter/trillian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlCutter/trillian/teams","hooks_url":"https://api.github.com/repos/AlCutter/trillian/hooks","issue_events_url":"https://api.github.com/repos/AlCutter/trillian/issues/events{/number}","events_url":"https://api.github.com/repos/AlCutter/trillian/events","assignees_url":"https://api.github.com/repos/AlCutter/trillian/assignees{/user}","branches_url":"https://api.github.com/repos/AlCutter/trillian/branches{/branch}","tags_url":"https://api.github.com/repos/AlCutter/trillian/tags","blobs_url":"https://api.github.com/repos/AlCutter/trillian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlCutter/trillian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlCutter/trillian/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlCutter/trillian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlCutter/trillian/statuses/{sha}","languages_url":"https://api.github.com/repos/AlCutter/trillian/languages","stargazers_url":"https://api.github.com/repos/AlCutter/trillian/stargazers","contributors_url":"https://api.github.com/repos/AlCutter/trillian/contributors","subscribers_url":"https://api.github.com/repos/AlCutter/trillian/subscribers","subscription_url":"https://api.github.com/repos/AlCutter/trillian/subscription","commits_url":"https://api.github.com/repos/AlCutter/trillian/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlCutter/trillian/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlCutter/trillian/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlCutter/trillian/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlCutter/trillian/contents/{+path}","compare_url":"https://api.github.com/repos/AlCutter/trillian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlCutter/trillian/merges","archive_url":"https://api.github.com/repos/AlCutter/trillian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlCutter/trillian/downloads","issues_url":"https://api.github.com/repos/AlCutter/trillian/issues{/number}","pulls_url":"https://api.github.com/repos/AlCutter/trillian/pulls{/number}","milestones_url":"https://api.github.com/repos/AlCutter/trillian/milestones{/number}","notifications_url":"https://api.github.com/repos/AlCutter/trillian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlCutter/trillian/labels{/name}","releases_url":"https://api.github.com/repos/AlCutter/trillian/releases{/id}","deployments_url":"https://api.github.com/repos/AlCutter/trillian/deployments","created_at":"2016-06-09T13:14:33Z","updated_at":"2016-06-09T13:16:40Z","pushed_at":"2016-07-14T11:31:43Z","git_url":"git://github.com/AlCutter/trillian.git","ssh_url":"git@github.com:AlCutter/trillian.git","clone_url":"https://github.com/AlCutter/trillian.git","svn_url":"https://github.com/AlCutter/trillian","homepage":null,"size":665,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"google:master","ref":"master","sha":"74c0b7018241ba6a52571c57c26655a9b926f278","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":58654489,"name":"trillian","full_name":"google/trillian","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/trillian","description":null,"fork":false,"url":"https://api.github.com/repos/google/trillian","forks_url":"https://api.github.com/repos/google/trillian/forks","keys_url":"https://api.github.com/repos/google/trillian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/trillian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/trillian/teams","hooks_url":"https://api.github.com/repos/google/trillian/hooks","issue_events_url":"https://api.github.com/repos/google/trillian/issues/events{/number}","events_url":"https://api.github.com/repos/google/trillian/events","assignees_url":"https://api.github.com/repos/google/trillian/assignees{/user}","branches_url":"https://api.github.com/repos/google/trillian/branches{/branch}","tags_url":"https://api.github.com/repos/google/trillian/tags","blobs_url":"https://api.github.com/repos/google/trillian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/trillian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/trillian/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/trillian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/trillian/statuses/{sha}","languages_url":"https://api.github.com/repos/google/trillian/languages","stargazers_url":"https://api.github.com/repos/google/trillian/stargazers","contributors_url":"https://api.github.com/repos/google/trillian/contributors","subscribers_url":"https://api.github.com/repos/google/trillian/subscribers","subscription_url":"https://api.github.com/repos/google/trillian/subscription","commits_url":"https://api.github.com/repos/google/trillian/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/trillian/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/trillian/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/trillian/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/trillian/contents/{+path}","compare_url":"https://api.github.com/repos/google/trillian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/trillian/merges","archive_url":"https://api.github.com/repos/google/trillian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/trillian/downloads","issues_url":"https://api.github.com/repos/google/trillian/issues{/number}","pulls_url":"https://api.github.com/repos/google/trillian/pulls{/number}","milestones_url":"https://api.github.com/repos/google/trillian/milestones{/number}","notifications_url":"https://api.github.com/repos/google/trillian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/trillian/labels{/name}","releases_url":"https://api.github.com/repos/google/trillian/releases{/id}","deployments_url":"https://api.github.com/repos/google/trillian/deployments","created_at":"2016-05-12T15:37:35Z","updated_at":"2016-07-11T18:35:45Z","pushed_at":"2016-07-14T13:18:21Z","git_url":"git://github.com/google/trillian.git","ssh_url":"git@github.com:google/trillian.git","clone_url":"https://github.com/google/trillian.git","svn_url":"https://github.com/google/trillian","homepage":null,"size":786,"stargazers_count":62,"watchers_count":62,"language":"Go","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":62,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/trillian/pulls/72"},"html":{"href":"https://github.com/google/trillian/pull/72"},"issue":{"href":"https://api.github.com/repos/google/trillian/issues/72"},"comments":{"href":"https://api.github.com/repos/google/trillian/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/google/trillian/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/google/trillian/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/trillian/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/google/trillian/statuses/f69c03aa5e94c3a410d80e4236fda85f5a44f815"}}}}
{"actor":{"display_login":"AlCutter"}}