{"action":"created","comment":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/comments/220017358","pull_request_review_id":158329638,"id":220017358,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDAxNzM1OA==","diff_hunk":"@@ -794,7 +797,7 @@ def compute_state_delta(self, room_id, batch, sync_config, since_token, now_toke\n             else:\n                 state_ids = {}\n                 if lazy_load_members:\n-                    if types:\n+                    if types and batch.events:","path":"synapse/handlers/sync.py","position":30,"original_position":30,"commit_id":"6ce888b8bdd14344fb595039924492a6fbde2254","original_commit_id":"6ce888b8bdd14344fb595039924492a6fbde2254","user":{"login":"richvdh","id":1389908,"node_id":"MDQ6VXNlcjEzODk5MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/1389908?v=4","gravatar_id":"","url":"https://api.github.com/users/richvdh","html_url":"https://github.com/richvdh","followers_url":"https://api.github.com/users/richvdh/followers","following_url":"https://api.github.com/users/richvdh/following{/other_user}","gists_url":"https://api.github.com/users/richvdh/gists{/gist_id}","starred_url":"https://api.github.com/users/richvdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richvdh/subscriptions","organizations_url":"https://api.github.com/users/richvdh/orgs","repos_url":"https://api.github.com/users/richvdh/repos","events_url":"https://api.github.com/users/richvdh/events{/privacy}","received_events_url":"https://api.github.com/users/richvdh/received_events","type":"User","site_admin":false},"body":"the problem is really that the belt-and-braces check on `types` *and* `batch.events` makes me wonder what I am missing.\r\n\r\nI guess you can argue this both ways though, so \\<shrug>","created_at":"2018-09-24T23:12:33Z","updated_at":"2018-09-24T23:12:33Z","html_url":"https://github.com/matrix-org/synapse/pull/3936#discussion_r220017358","pull_request_url":"https://api.github.com/repos/matrix-org/synapse/pulls/3936","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/comments/220017358"},"html":{"href":"https://github.com/matrix-org/synapse/pull/3936#discussion_r220017358"},"pull_request":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3936"}},"in_reply_to_id":220014412},"pull_request":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/3936","id":217658032,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NjU4MDMy","html_url":"https://github.com/matrix-org/synapse/pull/3936","diff_url":"https://github.com/matrix-org/synapse/pull/3936.diff","patch_url":"https://github.com/matrix-org/synapse/pull/3936.patch","issue_url":"https://api.github.com/repos/matrix-org/synapse/issues/3936","number":3936,"state":"open","locked":false,"title":"only try to LL members after a non-gappy incr sync if the timeline has events","user":{"login":"ara4n","id":1294269,"node_id":"MDQ6VXNlcjEyOTQyNjk=","avatar_url":"https://avatars2.githubusercontent.com/u/1294269?v=4","gravatar_id":"","url":"https://api.github.com/users/ara4n","html_url":"https://github.com/ara4n","followers_url":"https://api.github.com/users/ara4n/followers","following_url":"https://api.github.com/users/ara4n/following{/other_user}","gists_url":"https://api.github.com/users/ara4n/gists{/gist_id}","starred_url":"https://api.github.com/users/ara4n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ara4n/subscriptions","organizations_url":"https://api.github.com/users/ara4n/orgs","repos_url":"https://api.github.com/users/ara4n/repos","events_url":"https://api.github.com/users/ara4n/events{/privacy}","received_events_url":"https://api.github.com/users/ara4n/received_events","type":"User","site_admin":false},"body":"This was okay until we started to try to LL ourselves, which would then cause\r\nus to try to add LL members even if the timeline was empty.  This caused an\r\nout of bounds exception","created_at":"2018-09-24T13:33:19Z","updated_at":"2018-09-24T23:12:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"baa6d97a51203b7d949e7edb6a9b1f0cda6e38e3","assignee":{"login":"ara4n","id":1294269,"node_id":"MDQ6VXNlcjEyOTQyNjk=","avatar_url":"https://avatars2.githubusercontent.com/u/1294269?v=4","gravatar_id":"","url":"https://api.github.com/users/ara4n","html_url":"https://github.com/ara4n","followers_url":"https://api.github.com/users/ara4n/followers","following_url":"https://api.github.com/users/ara4n/following{/other_user}","gists_url":"https://api.github.com/users/ara4n/gists{/gist_id}","starred_url":"https://api.github.com/users/ara4n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ara4n/subscriptions","organizations_url":"https://api.github.com/users/ara4n/orgs","repos_url":"https://api.github.com/users/ara4n/repos","events_url":"https://api.github.com/users/ara4n/events{/privacy}","received_events_url":"https://api.github.com/users/ara4n/received_events","type":"User","site_admin":false},"assignees":[{"login":"ara4n","id":1294269,"node_id":"MDQ6VXNlcjEyOTQyNjk=","avatar_url":"https://avatars2.githubusercontent.com/u/1294269?v=4","gravatar_id":"","url":"https://api.github.com/users/ara4n","html_url":"https://github.com/ara4n","followers_url":"https://api.github.com/users/ara4n/followers","following_url":"https://api.github.com/users/ara4n/following{/other_user}","gists_url":"https://api.github.com/users/ara4n/gists{/gist_id}","starred_url":"https://api.github.com/users/ara4n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ara4n/subscriptions","organizations_url":"https://api.github.com/users/ara4n/orgs","repos_url":"https://api.github.com/users/ara4n/repos","events_url":"https://api.github.com/users/ara4n/events{/privacy}","received_events_url":"https://api.github.com/users/ara4n/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/matrix-org/synapse/pulls/3936/commits","review_comments_url":"https://api.github.com/repos/matrix-org/synapse/pulls/3936/comments","review_comment_url":"https://api.github.com/repos/matrix-org/synapse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matrix-org/synapse/issues/3936/comments","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/6ce888b8bdd14344fb595039924492a6fbde2254","head":{"label":"matrix-org:matthew/fix-self-ll","ref":"matthew/fix-self-ll","sha":"6ce888b8bdd14344fb595039924492a6fbde2254","user":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":22844864,"node_id":"MDEwOlJlcG9zaXRvcnkyMjg0NDg2NA==","name":"synapse","full_name":"matrix-org/synapse","private":false,"owner":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/matrix-org/synapse","description":"Synapse: Matrix reference homeserver","fork":false,"url":"https://api.github.com/repos/matrix-org/synapse","forks_url":"https://api.github.com/repos/matrix-org/synapse/forks","keys_url":"https://api.github.com/repos/matrix-org/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/synapse/teams","hooks_url":"https://api.github.com/repos/matrix-org/synapse/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/synapse/events","assignees_url":"https://api.github.com/repos/matrix-org/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/synapse/tags","blobs_url":"https://api.github.com/repos/matrix-org/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/synapse/languages","stargazers_url":"https://api.github.com/repos/matrix-org/synapse/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/synapse/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/synapse/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/synapse/subscription","commits_url":"https://api.github.com/repos/matrix-org/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/synapse/merges","archive_url":"https://api.github.com/repos/matrix-org/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/synapse/downloads","issues_url":"https://api.github.com/repos/matrix-org/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/synapse/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/synapse/releases{/id}","deployments_url":"https://api.github.com/repos/matrix-org/synapse/deployments","created_at":"2014-08-11T15:51:42Z","updated_at":"2018-09-24T18:11:04Z","pushed_at":"2018-09-24T22:54:59Z","git_url":"git://github.com/matrix-org/synapse.git","ssh_url":"git@github.com:matrix-org/synapse.git","clone_url":"https://github.com/matrix-org/synapse.git","svn_url":"https://github.com/matrix-org/synapse","homepage":"http://matrix.org","size":22381,"stargazers_count":3262,"watchers_count":3262,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":462,"mirror_url":null,"archived":false,"open_issues_count":941,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":462,"open_issues":941,"watchers":3262,"default_branch":"master"}},"base":{"label":"matrix-org:develop","ref":"develop","sha":"ad53a5497d77d28a1a01d77945af6c6d1bee0bb1","user":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":22844864,"node_id":"MDEwOlJlcG9zaXRvcnkyMjg0NDg2NA==","name":"synapse","full_name":"matrix-org/synapse","private":false,"owner":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/matrix-org/synapse","description":"Synapse: Matrix reference homeserver","fork":false,"url":"https://api.github.com/repos/matrix-org/synapse","forks_url":"https://api.github.com/repos/matrix-org/synapse/forks","keys_url":"https://api.github.com/repos/matrix-org/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/synapse/teams","hooks_url":"https://api.github.com/repos/matrix-org/synapse/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/synapse/events","assignees_url":"https://api.github.com/repos/matrix-org/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/synapse/tags","blobs_url":"https://api.github.com/repos/matrix-org/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/synapse/languages","stargazers_url":"https://api.github.com/repos/matrix-org/synapse/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/synapse/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/synapse/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/synapse/subscription","commits_url":"https://api.github.com/repos/matrix-org/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/synapse/merges","archive_url":"https://api.github.com/repos/matrix-org/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/synapse/downloads","issues_url":"https://api.github.com/repos/matrix-org/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/synapse/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/synapse/releases{/id}","deployments_url":"https://api.github.com/repos/matrix-org/synapse/deployments","created_at":"2014-08-11T15:51:42Z","updated_at":"2018-09-24T18:11:04Z","pushed_at":"2018-09-24T22:54:59Z","git_url":"git://github.com/matrix-org/synapse.git","ssh_url":"git@github.com:matrix-org/synapse.git","clone_url":"https://github.com/matrix-org/synapse.git","svn_url":"https://github.com/matrix-org/synapse","homepage":"http://matrix.org","size":22381,"stargazers_count":3262,"watchers_count":3262,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":462,"mirror_url":null,"archived":false,"open_issues_count":941,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":462,"open_issues":941,"watchers":3262,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3936"},"html":{"href":"https://github.com/matrix-org/synapse/pull/3936"},"issue":{"href":"https://api.github.com/repos/matrix-org/synapse/issues/3936"},"comments":{"href":"https://api.github.com/repos/matrix-org/synapse/issues/3936/comments"},"review_comments":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3936/comments"},"review_comment":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/3936/commits"},"statuses":{"href":"https://api.github.com/repos/matrix-org/synapse/statuses/6ce888b8bdd14344fb595039924492a6fbde2254"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"richvdh"}}