8000 Rework relations storage and background update to handle any relation type · Issue #11387 · matrix-org/synapse · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Rework relations storage and background update to handle any relation type #11387
Closed
@clokep

Description

@clokep

The event_thread_relation background update is fairly heavy and only looks for the unstable io.element.thread relation. We will need to essentially re-run this when MSC3440 is stabilized to search for m.thread relations instead.

It seems a better way to do this would be to store unknown relation types into the database (and potentially filter them on fetch) so that we do not need to crawl all events in the future when more relation types are added. If a future relation has additional data which must be processed, similar to the key field of m.annotation, then this would allow easily re-processing only the events with that relation.

Note that this was previously discussed at #11088 (comment) but rejected. This is being reconsidered in light of #11375 and other problems with running this background update.

The overall plan for how to accomplish this would be:

  1. Replace the current background update with a no-op, this allows any servers which have not finished it to give up.
  2. Write a new background update that does something similar, but pulls in any relation type.
  3. Rework the code in _handle_event_relations to save any relation of new events (instead of only known relations).
  4. (Optionally) Modify places where we fetch relations to limit to only "known" relations.

This also has the benefit of allowing for easier experimentation with unknown relations. Synapse would (somewhat obviously) not include those in bundled relations since the format of those is custom per relation type.

Metadata

Metadata

Assignees

Labels

A-ThreadsThreaded messagesT-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0