mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-09 15:13:12 -06:00
Clean up
This commit is contained in:
parent
18ddda3832
commit
d6de8d2a6f
|
|
@ -60,10 +60,9 @@ import (
|
||||||
// per-room durable consumers will only progress through the stream
|
// per-room durable consumers will only progress through the stream
|
||||||
// as events are processed.
|
// as events are processed.
|
||||||
//
|
//
|
||||||
// A BC * -> positions of each consumer (* = ephemeral)
|
// > A BC * -> positions of each consumer (* = ephemeral)
|
||||||
// ⌄ ⌄⌄ ⌄
|
// > ⌄ ⌄⌄ ⌄
|
||||||
//
|
// > ABAABCAABCAA -> newest (letter = subject for each message)
|
||||||
// ABAABCAABCAA -> newest (letter = subject for each message)
|
|
||||||
//
|
//
|
||||||
// In this example, A is still processing an event but has two
|
// In this example, A is still processing an event but has two
|
||||||
// pending events to process afterwards. Both B and C are caught
|
// pending events to process afterwards. Both B and C are caught
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ func (d *Database) RoomInfo(ctx context.Context, roomID string) (*types.RoomInfo
|
||||||
func (d *Database) roomInfo(ctx context.Context, txn *sql.Tx, roomID string) (*types.RoomInfo, error) {
|
func (d *Database) roomInfo(ctx context.Context, txn *sql.Tx, roomID string) (*types.RoomInfo, error) {
|
||||||
roomInfo, ok := d.Cache.GetRoomInfo(roomID)
|
roomInfo, ok := d.Cache.GetRoomInfo(roomID)
|
||||||
if ok && roomInfo != nil {
|
if ok && roomInfo != nil {
|
||||||
// The data that's in the cache is not stubby, so return it.
|
// Return the cache entry.
|
||||||
return roomInfo, nil
|
return roomInfo, nil
|
||||||
}
|
}
|
||||||
// At this point we either don't have an entry in the cache, or
|
// At this point we either don't have an entry in the cache, or
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue