Skip to content

Forbid main thread queries from room#6224

Merged
TimoPtr merged 1 commit intomainfrom
feature/forbid_db_call_on_main
Jan 14, 2026
Merged

Forbid main thread queries from room#6224
TimoPtr merged 1 commit intomainfrom
feature/forbid_db_call_on_main

Conversation

@TimoPtr
Copy link
Copy Markdown
Member

@TimoPtr TimoPtr commented Jan 2, 2026

Summary

In theory everything is now interacting with the database in the main thread. We might have forget some usages, but a good way to find them would be to try to remove this option on room that allow the queries to happen on the main thread.

Checklist

  • New or updated tests have been added to cover the changes following the testing guidelines.
  • The code follows the project's code style and best_practices.
  • The changes have been thoroughly tested, and edge cases have been considered.
  • Changes are backward compatible whenever feasible. Any breaking changes are documented in the changelog for users and/or in the code for developers depending on the relevance.

Any other notes

@TimoPtr TimoPtr requested a review from jpelgrom January 2, 2026 15:28
@jpelgrom
Copy link
Copy Markdown
Member

jpelgrom commented Jan 2, 2026

Makes me wonder why it was ever set to allow this in the first place, as Rooms default is to not allow this.

@TimoPtr
Copy link
Copy Markdown
Member Author

TimoPtr commented Jan 5, 2026

Makes me wonder why it was ever set to allow this in the first place, as Rooms default is to not allow this.

It was added in July 2020 #633 I think no one ever noticed the option.

@TimoPtr TimoPtr merged commit ca96089 into main Jan 14, 2026
22 checks passed
@TimoPtr TimoPtr deleted the feature/forbid_db_call_on_main branch January 14, 2026 09:55
sk7n4k3d pushed a commit to sk7n4k3d/home-assistant-android that referenced this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants