aboutsummaryrefslogtreecommitdiff
path: root/roomserver
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-02-22 13:40:08 +0000
committerGitHub <noreply@github.com>2022-02-22 13:40:08 +0000
commite9545dc12fc699b237f51c1aa67dbbef898b27ce (patch)
treee2b4260a985546aa6ac81970957953ebf4d7932d /roomserver
parent600fbae31f1b0b6919bb9045958b932071de6737 (diff)
Remove error when state keys are missing for user NIDs (#2213)
* Remove error when state keys are missing for user NIDs There is still an actual bug here somewhere in the membership updater, but this check does more harm than good, since it means that the key consumers don't actually distribute updates to *anyone*. It's better just to deal with this silently for now. To find these broken rows: ``` SELECT * FROM roomserver_membership AS m WHERE NOT EXISTS ( SELECT event_state_key_nid FROM roomserver_event_state_keys AS s WHERE m.sender_nid = s.event_state_key_nid ); ``` * Logging
Diffstat (limited to 'roomserver')
-rw-r--r--roomserver/storage/shared/storage.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/roomserver/storage/shared/storage.go b/roomserver/storage/shared/storage.go
index b255cfb3..e270e121 100644
--- a/roomserver/storage/shared/storage.go
+++ b/roomserver/storage/shared/storage.go
@@ -13,6 +13,7 @@ import (
"github.com/matrix-org/dendrite/roomserver/types"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util"
+ "github.com/sirupsen/logrus"
"github.com/tidwall/gjson"
)
@@ -1101,7 +1102,7 @@ func (d *Database) JoinedUsersSetInRooms(ctx context.Context, roomIDs []string)
return nil, err
}
if len(nidToUserID) != len(userNIDToCount) {
- return nil, fmt.Errorf("found %d users but only have state key nids for %d of them", len(userNIDToCount), len(nidToUserID))
+ logrus.Warnf("SelectJoinedUsersSetForRooms found %d users but BulkSelectEventStateKey only returned state key NIDs for %d of them", len(userNIDToCount), len(nidToUserID))
}
result := make(map[string]int, len(userNIDToCount))
for nid, count := range userNIDToCount {