-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
only try to LL members after a non-gappy incr sync if the timeline has events #3936
Conversation
…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
(fixes regression in #3916) |
There was a problem hiding this 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 Always LL ourselves if we're in a room to simplify clients #3916 was a thing: why would we want to include our member event for each and every incremental sync? (Show own avatar in composer before members load 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 Always LL ourselves if we're in a room to simplify clients #3916, could they not be tweaked to catch this edge-case?
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. |
(tests got added in matrix-org/sytest#496) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
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