aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-10-08 12:22:00 +0100
committerGitHub <noreply@github.com>2020-10-08 12:22:00 +0100
commita846dad0e1c2cd8d43d57bc72d106574bc350c39 (patch)
treeced60fed38ff567a2404c691872aae135c08f9d5
parent429bd48129b375c853dec5416212d44dd14cc0db (diff)
Return what we have when we encounter missing events when servicing backfill/gme (#1499)
We expect to have missing events as we walk back in the DAG over federation as we didn't always create the room. When checking if the server is allowed to see those events, just give up and stop rather than fail the request.
-rw-r--r--roomserver/internal/helpers/helpers.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/roomserver/internal/helpers/helpers.go b/roomserver/internal/helpers/helpers.go
index a2fbd287..4c072e44 100644
--- a/roomserver/internal/helpers/helpers.go
+++ b/roomserver/internal/helpers/helpers.go
@@ -309,7 +309,9 @@ BFSLoop:
util.GetLogger(ctx).WithField("server", serverName).WithField("event_id", pre).WithError(err).Error(
"Error checking if allowed to see event",
)
- return resultNIDs, err
+ // drop the error, as we will often error at the DB level if we don't have the prev_event itself. Let's
+ // just return what we have.
+ return resultNIDs, nil
}
// If the event hasn't been seen before and the HS