mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-20 12:33:09 -06:00
Hopefully fix backfilling
This commit is contained in:
parent
8d207b7a97
commit
f182fd7ee3
|
|
@ -83,7 +83,7 @@ func Backfill(
|
||||||
"": eIDs,
|
"": eIDs,
|
||||||
},
|
},
|
||||||
ServerName: request.Origin(),
|
ServerName: request.Origin(),
|
||||||
VirtualHost: request.Origin(),
|
VirtualHost: request.Destination(),
|
||||||
}
|
}
|
||||||
if req.Limit, err = strconv.Atoi(limit); err != nil {
|
if req.Limit, err = strconv.Atoi(limit); err != nil {
|
||||||
util.GetLogger(httpReq.Context()).WithError(err).Error("strconv.Atoi failed")
|
util.GetLogger(httpReq.Context()).WithError(err).Error("strconv.Atoi failed")
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ func (r *Backfiller) PerformBackfill(
|
||||||
// TODO: we could be more sensible and fetch as many events we already have then request the rest
|
// TODO: we could be more sensible and fetch as many events we already have then request the rest
|
||||||
// which is what the syncapi does already.
|
// which is what the syncapi does already.
|
||||||
if r.IsLocalServerName(request.ServerName) {
|
if r.IsLocalServerName(request.ServerName) {
|
||||||
|
logrus.Debugf("backfilling via federation: %+v", request)
|
||||||
return r.backfillViaFederation(ctx, request, response)
|
return r.backfillViaFederation(ctx, request, response)
|
||||||
}
|
}
|
||||||
// someone else is requesting the backfill, try to service their request.
|
// someone else is requesting the backfill, try to service their request.
|
||||||
|
|
@ -319,6 +320,7 @@ FederationHit:
|
||||||
FedClient: b.fsAPI,
|
FedClient: b.fsAPI,
|
||||||
RememberAuthEvents: false,
|
RememberAuthEvents: false,
|
||||||
Server: srv,
|
Server: srv,
|
||||||
|
Origin: b.virtualHost,
|
||||||
}
|
}
|
||||||
res, err := c.StateIDsBeforeEvent(ctx, targetEvent)
|
res, err := c.StateIDsBeforeEvent(ctx, targetEvent)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue