Files
synapse/tests
Matthew Hodgson be4439efbc Only use a prefetched summary for the queue entry it was started for
Regression test for a room linked from two spaces: the room is queued
once per edge (the queue is only deduplicated when popped), each entry
carrying the via and depth to summarise that edge with, and an entry
queued later is popped first. Keying the prefetches by room id alone
meant the popped entry could consume a summary computed for a different
edge - summarising with the wrong via (so a room reachable only via the
other parent is dropped from the hierarchy) or the wrong depth (so a
room at max_depth is returned with children_state).

Iterating the prefetch window in pop order, as the previous commit did,
is not sufficient on its own: the entry for the shallower edge can be
prefetched on an earlier iteration, before the deeper edge is queued at
all. Track the entry each prefetch was started for and recompute when it
is not the one popped.

The test fails without the entry check (the room is summarised via the
root's dead via and disappears from the hierarchy).
2026-08-08 23:27:40 +03:00
..
2026-06-02 11:05:38 +01:00