Skip to content

Ensure all relevant SaveLockedStateStore functions are synchronized #6546

@mgoldenberg

Description

@mgoldenberg

Since #6478, the BaseStateStore uses a SaveLockedStateStore to ensure that calls to the underlying StateStore::save_changes are synchronized. It likely makes sense, however, to synchronize calls to other StateStore functions which may interfere with StateStore::save_changes, if they are not also synchronized.

Below is a list of StateStore functions which write to the database (other than StateStore::save_changes).

  1. set_kv_data
  2. remove_kv_data
  3. set_custom_value
  4. remove_custom_value
  5. remove_room
  6. save_send_queue_request
  7. update_send_queue_request
  8. remove_send_queue_request
  9. update_send_queue_request_status
  10. save_dependent_queued_request
  11. mark_dependent_queued_requests_as_ready
  12. update_dependent_queued_request
  13. remove_dependent_queued_request
  14. upsert_thread_subscription
  15. remove_thread_subscription
  16. set_custom_value_no_read

It seems the most relevant function is (5) remove_room. But there may be others in this list which might benefit from being synchronized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions