This commit is contained in:
Neil Alexander 2020-08-25 11:23:00 +01:00
parent ede9da20dd
commit ffc109e406
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 3 additions and 4 deletions

View file

@ -47,7 +47,7 @@ func (c Caches) GetRoomServerStateKeyNID(stateKey string) (types.EventStateKeyNI
} }
func (c Caches) StoreRoomServerStateKeyNID(stateKey string, nid types.EventStateKeyNID) { func (c Caches) StoreRoomServerStateKeyNID(stateKey string, nid types.EventStateKeyNID) {
c.RoomVersions.Set(stateKey, nid) c.RoomServerStateKeyNIDs.Set(stateKey, nid)
} }
func (c Caches) GetRoomServerEventTypeNID(eventType string) (types.EventTypeNID, bool) { func (c Caches) GetRoomServerEventTypeNID(eventType string) (types.EventTypeNID, bool) {
@ -61,7 +61,7 @@ func (c Caches) GetRoomServerEventTypeNID(eventType string) (types.EventTypeNID,
} }
func (c Caches) StoreRoomServerEventTypeNID(eventType string, nid types.EventTypeNID) { func (c Caches) StoreRoomServerEventTypeNID(eventType string, nid types.EventTypeNID) {
c.RoomVersions.Set(eventType, nid) c.RoomServerEventTypeNIDs.Set(eventType, nid)
} }
func (c Caches) GetRoomServerRoomNID(roomID string) (types.RoomNID, bool) { func (c Caches) GetRoomServerRoomNID(roomID string) (types.RoomNID, bool) {
@ -75,5 +75,5 @@ func (c Caches) GetRoomServerRoomNID(roomID string) (types.RoomNID, bool) {
} }
func (c Caches) StoreRoomServerRoomNID(roomID string, nid types.RoomNID) { func (c Caches) StoreRoomServerRoomNID(roomID string, nid types.RoomNID) {
c.RoomVersions.Set(roomID, nid) c.RoomServerRoomNIDs.Set(roomID, nid)
} }

View file

@ -216,7 +216,6 @@ func (d *Database) RoomNIDExcludingStubs(ctx context.Context, roomID string) (ro
if err != nil { if err != nil {
return return
} }
d.Cache.StoreRoomServerRoomNID(roomID, roomNID)
} }
latestEvents, _, err := d.RoomsTable.SelectLatestEventNIDs(ctx, nil, roomNID) latestEvents, _, err := d.RoomsTable.SelectLatestEventNIDs(ctx, nil, roomNID)
if err != nil { if err != nil {