mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-06 06:23:10 -06:00
Add hard limit at 100 events, same as Synapse
This commit is contained in:
parent
b2f99b31b9
commit
457baac766
|
|
@ -95,6 +95,12 @@ func Backfill(
|
|||
}
|
||||
}
|
||||
|
||||
// Enforce a limit of 100 events, as not to hit the DB to hard.
|
||||
// Synapse has a hard limit of 100 events as well.
|
||||
if req.Limit > 100 {
|
||||
req.Limit = 100
|
||||
}
|
||||
|
||||
// Query the Roomserver.
|
||||
if err = rsAPI.PerformBackfill(httpReq.Context(), &req, &res); err != nil {
|
||||
util.GetLogger(httpReq.Context()).WithError(err).Error("query.PerformBackfill failed")
|
||||
|
|
|
|||
Loading…
Reference in a new issue