mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 12:52:24 +03:00
Only pull state we actually need
This commit is contained in:
parent
294f3d2a10
commit
44c52a2482
1 changed files with 3 additions and 1 deletions
|
@ -1487,7 +1487,9 @@ func (d *Database) GetBulkStateContent(ctx context.Context, roomIDs []string, tu
|
|||
if roomInfo == nil || roomInfo.IsStub() {
|
||||
continue
|
||||
}
|
||||
entries, err2 := d.loadStateAtSnapshot(ctx, roomInfo.StateSnapshotNID())
|
||||
// We don't need a querier here, as we don't actually do state resolution
|
||||
res := state.NewStateResolution(d, roomInfo, nil)
|
||||
entries, err2 := res.LoadStateAtSnapshotForStringTuples(ctx, roomInfo.StateSnapshotNID(), tuples)
|
||||
if err2 != nil {
|
||||
return nil, fmt.Errorf("GetBulkStateContent: failed to load state for room %s : %w", roomID, err2)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue