mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-06 14:33:10 -06:00
Clarify what went wrong for event length mismatches
This commit is contained in:
parent
37c804fa90
commit
aee6420cc0
|
|
@ -72,7 +72,7 @@ func (s *outputRoomEventsStatements) Events(txn *sql.Tx, eventIDs []string) ([]g
|
|||
}
|
||||
defer rows.Close()
|
||||
|
||||
result := make([]gomatrixserverlib.Event, len(eventIDs))
|
||||
var result []gomatrixserverlib.Event
|
||||
i := 0
|
||||
for ; rows.Next(); i++ {
|
||||
var eventBytes []byte
|
||||
|
|
@ -86,7 +86,7 @@ func (s *outputRoomEventsStatements) Events(txn *sql.Tx, eventIDs []string) ([]g
|
|||
result = append(result, ev)
|
||||
}
|
||||
if i != len(eventIDs) {
|
||||
return nil, fmt.Errorf("failed to map all event IDs to events: (%d != %d)", i, len(eventIDs))
|
||||
return nil, fmt.Errorf("failed to map all event IDs to events: (got %d, wanted, %d)", i, len(eventIDs))
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
consumer_uris: ["localhost:9092"]
|
||||
|
||||
# The name of the topic which the sync server will consume events from.
|
||||
roomserver_topic: "roomserverOutput"
|
||||
roomserver_topic: "roomserverOutput2"
|
||||
|
||||
# The database URI to store sync server information.
|
||||
database: "postgres://dendrite:itsasecret@localhost/syncserver?sslmode=disable"
|
||||
|
|
|
|||
Loading…
Reference in a new issue