Update comment a bit, since we now also enforce max 100 events

This commit is contained in:
Till Faelligen 2024-01-20 20:19:45 +01:00
parent ed92329791
commit cf164906a0
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -91,13 +91,13 @@ type PerformBackfillRequest struct {
}
// PrevEventIDs returns the prev_event IDs of either 100 backwards extremities or
// len(r.BackwardsExtremities). Limited to 100, due to Synapse stopping after reaching
// len(r.BackwardsExtremities). Limited to 100, due to Synapse/Dendrite stopping after reaching
// this limit. (which sounds sane)
func (r *PerformBackfillRequest) PrevEventIDs() []string {
var uniqueIDs map[string]struct{}
// Create a unique eventID map of either 100 or len(r.BackwardsExtremities).
// 100 since Synapse stops after reaching 100 events.
// 100 since Synapse/Dendrite stops after reaching 100 events.
if len(r.BackwardsExtremities) > 100 {
uniqueIDs = make(map[string]struct{}, 100)
} else {