Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

only try to LL members after a non-gappy incr sync if the timeline has events#3936

Merged
ara4n merged 3 commits into
developfrom
matthew/fix-self-ll
Sep 24, 2018
Merged

only try to LL members after a non-gappy incr sync if the timeline has events#3936
ara4n merged 3 commits into
developfrom
matthew/fix-self-ll

Conversation

@ara4n
Copy link
Copy Markdown
Member

@ara4n ara4n commented Sep 24, 2018

This was okay until we started to try to LL ourselves, which would then cause
us to try to add LL members even if the timeline was empty. This caused an
out of bounds exception

…s events.

This was okay until we started to try to LL ourselves, which would then cause
us to try to add LL members even if the timeline was empty.  This caused an
out of bounds exception
@ara4n ara4n requested a review from richvdh September 24, 2018 13:33
@ara4n
Copy link
Copy Markdown
Member Author

ara4n commented Sep 24, 2018

(fixes regression in #3916)

Copy link
Copy Markdown
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, the code looks fine I guess, so if we're really in a hurry we could merge it. However:

  • I don't really understand why #3916 was a thing: why would we want to include our member event for each and every incremental sync? (element-hq/element-web#7282 talks about doing this for initial sync, but doesn't explain why it was necessary for incremental sync).
  • given we seem to have sytests which test #3916, could they not be tweaked to catch this edge-case?

Comment thread synapse/handlers/sync.py
@ara4n
Copy link
Copy Markdown
Member Author

ara4n commented Sep 24, 2018

We LL ourselves in case it's a gappy sync, and in case we were doing LL over gappy syncs (i.e. if #3840 hadn't disabled it). In practice the members will get removed by the anti-redundancy code. In practice I guess we can move it to only apply to initial syncs for now to avoid needless work; will do so.

Yup, the sytests could catch this edge case.

Comment thread synapse/handlers/sync.py
@ara4n
Copy link
Copy Markdown
Member Author

ara4n commented Sep 24, 2018

(tests got added in matrix-org/sytest#496)

Copy link
Copy Markdown
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ara4n ara4n merged commit 787d22e into develop Sep 24, 2018
@ara4n ara4n deleted the matthew/fix-self-ll branch September 24, 2018 23:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants