Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

populate_stats_process_rooms runs in the wrong order #7380

Closed
michaelkaye opened this issue Apr 30, 2020 · 3 comments
Closed

populate_stats_process_rooms runs in the wrong order #7380

michaelkaye opened this issue Apr 30, 2020 · 3 comments
Assignees

Comments

@michaelkaye
Copy link
Contributor

Upgrading from a 1.0 synapse to the latest causes an issue where the populate_stats_process_rooms background task starts running immediately, however I believe it's actually requiring data that is changed as part of current_state_events_membership to function correctly.

i think there should be a dependency from current_state_events_membership to populate_stats_process_rooms to fix this, but there may also be others - is this something that needs to be thought about when choosing background updates' dependencies, i don't think they automatically wait until the ones from previous versions are run.

This isn't a problem when keeping up to date with synapse, but doing larger bulk updates can cause issues.

@richvdh richvdh self-assigned this May 1, 2020
@richvdh
Copy link
Member

richvdh commented May 1, 2020

just having a look at this

@richvdh
Copy link
Member

richvdh commented May 1, 2020

We've tried to address this problem in the general case for future versions by making bg updates run in series rather than parallel, and by giving them a number (#7190). For existing updates, it's a bit hard to fix properly without spending a lot of time going through adding dependencies. I think it makes more sense to fix them where they are found.

In this case: did populate_stats_process_rooms fail, or did it run and do nothing? The former case is obviously much easier to fix retrospectively.

@richvdh
Copy link
Member

richvdh commented May 1, 2020

In this case: did populate_stats_process_rooms fail, or did it run and do nothing?

It ran and did nothing.

@richvdh richvdh changed the title Upgrading over multiple versions can cause background queries to run out of order populate_stats_process_rooms runs in the wrong order May 1, 2020
richvdh added a commit that referenced this issue May 1, 2020
…s_rooms (#7387)

populate_stats_process_rooms was added in #5971 / v1.4.0; current_state_events_membership was added in #5706 / v1.3.0.

Fixes #7380.
@richvdh richvdh closed this as completed May 5, 2020
phil-flex pushed a commit to phil-flex/synapse that referenced this issue Jun 16, 2020
…s_rooms (matrix-org#7387)

populate_stats_process_rooms was added in matrix-org#5971 / v1.4.0; current_state_events_membership was added in matrix-org#5706 / v1.3.0.

Fixes matrix-org#7380.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants