diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-02-04 12:13:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 12:13:07 +0000 |
commit | 532f445c4e31396fc3aa4f52e0e078cd499bc39a (patch) | |
tree | f8d7391754e01758dd73a4c21e7b5eb79051d926 /roomserver | |
parent | eb352a5f6bdb48cb2d795e3fe2cd7d354580a761 (diff) |
Remove roomserver input deadlines (#2144)
It isn't really clear that the deadlines actually help in any way. Currently we can use up our 2 minutes doing something, run out of context time and then return an error which causes the transaction to rollback and forgetting everything we've done. If the message came to us from NATS then we probably will end up retrying just to be in the same situation. We'd be really a lot better if we just spent the time reconciling the problem in the first place, and then we're much less likely to need to fetch those missing auth or prev events in the future.
Also includes matrix-org/gomatrixserverlib#287 so we don't wait so long for servers that are obviously dead.
Diffstat (limited to 'roomserver')
-rw-r--r-- | roomserver/internal/input/input_events.go | 4 | ||||
-rw-r--r-- | roomserver/internal/input/input_missing.go | 4 |
2 files changed, 0 insertions, 8 deletions
diff --git a/roomserver/internal/input/input_events.go b/roomserver/internal/input/input_events.go index f3fa83d8..0ca5c31a 100644 --- a/roomserver/internal/input/input_events.go +++ b/roomserver/internal/input/input_events.go @@ -369,10 +369,6 @@ func (r *Inputer) fetchAuthEvents( known map[string]*types.Event, servers []gomatrixserverlib.ServerName, ) error { - var cancel context.CancelFunc - ctx, cancel = context.WithTimeout(ctx, MaximumMissingProcessingTime) - defer cancel() - unknown := map[string]struct{}{} authEventIDs := event.AuthEventIDs() if len(authEventIDs) == 0 { diff --git a/roomserver/internal/input/input_missing.go b/roomserver/internal/input/input_missing.go index 4cd2b3de..4d330666 100644 --- a/roomserver/internal/input/input_missing.go +++ b/roomserver/internal/input/input_missing.go @@ -37,10 +37,6 @@ type missingStateReq struct { func (t *missingStateReq) processEventWithMissingState( ctx context.Context, e *gomatrixserverlib.Event, roomVersion gomatrixserverlib.RoomVersion, ) error { - var cancel context.CancelFunc - ctx, cancel = context.WithTimeout(ctx, MaximumMissingProcessingTime) - defer cancel() - // We are missing the previous events for this events. // This means that there is a gap in our view of the history of the // room. There two ways that we can handle such a gap: |