Skip to content

fix(device-handler): make _maybe_retry_device_resync thread-safe #18391

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

Merged
merged 3 commits into from
May 26, 2025

Conversation

3nprob
Copy link
Contributor

@3nprob 3nprob commented May 5, 2025

A race-condition may render concurrent retry loops.

Use an actual Lock for guarding single access of device resyncing retrying.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

@3nprob 3nprob force-pushed the thread-safe-device-resync branch 2 times, most recently from 21c12dd to 6ceb54e Compare May 5, 2025 04:14
@3nprob 3nprob marked this pull request as ready for review May 6, 2025 00:39
@3nprob 3nprob requested a review from a team as a code owner May 6, 2025 00:39
@3nprob 3nprob force-pushed the thread-safe-device-resync branch from 6ceb54e to e4cf3b5 Compare May 6, 2025 07:09
Copy link
Member

@sandhose sandhose left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! Is this an issue you encountered in production?

@3nprob 3nprob requested a review from sandhose May 6, 2025 22:52
@3nprob 3nprob force-pushed the thread-safe-device-resync branch from 5e10128 to f17bb8b Compare May 6, 2025 22:59
@3nprob
Copy link
Contributor Author

3nprob commented May 7, 2025

Thanks for the fix! Is this an issue you encountered in production?

NP and ty for review!

I believe so but haven't reproduced.

@3nprob 3nprob force-pushed the thread-safe-device-resync branch from f17bb8b to ea6f93c Compare May 7, 2025 19:14
@3nprob 3nprob requested a review from sandhose May 7, 2025 19:15
@3nprob 3nprob force-pushed the thread-safe-device-resync branch from ea6f93c to 3c136b0 Compare May 7, 2025 19:41
@3nprob 3nprob force-pushed the thread-safe-device-resync branch from 3c136b0 to dd9eedc Compare May 15, 2025 22:36
@3nprob 3nprob force-pushed the thread-safe-device-resync branch from dd9eedc to 9969023 Compare May 24, 2025 01:44
@sandhose sandhose merged commit 33ba886 into element-hq:develop May 26, 2025
39 checks passed
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 this pull request may close these issues.

2 participants