Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: If you get a lot of to-device msgs all at once, ensure they are processed in-order #35

Closed
andybalaam opened this issue Mar 22, 2024 · 2 comments · Fixed by #81
Closed
Assignees

Comments

@andybalaam
Copy link
Contributor

See element-hq/element-web#25723

@andybalaam andybalaam changed the title If you get a lot of to-device msgs all at once, ensure they are processed in-order Test: If you get a lot of to-device msgs all at once, ensure they are processed in-order Mar 22, 2024
@kegsay
Copy link
Member

kegsay commented May 16, 2024

This is tougher to do, as we really want the test itself to be a client so it can interleave misordered room keys around. It would require us to either use libolm (which is a hard dep on Complement today) or vodozemac. It feels wrong to be using vodozemac to test vodozemac though...

@kegsay
Copy link
Member

kegsay commented May 28, 2024

One alternative would be to:

  • block /sync
  • Spin up a lot of clients (e.g 50) which will join the same room and send 5 msgs (causing to-device msgs to be sent), especially with a low rotation period (1 msg), this will cause 5x50=250 to-device msgs
  • unblock /sync
  • the next /sync will have hundreds of to-device msgs
  • ensure all messages can be decrypted.

Given the original issue is tracking "skipped keys" which are per-device, it would be better to decrease the number of clients and increase the number of messages sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants