Skip to content

Commit

Permalink
Only pull state we actually need
Browse files Browse the repository at this point in the history
  • Loading branch information
S7evinK committed Dec 19, 2024
1 parent 294f3d2 commit 44c52a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion roomserver/storage/shared/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 44c52a2

Please sign in to comment.