mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-06 22:43: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()
|
defer rows.Close()
|
||||||
|
|
||||||
result := make([]gomatrixserverlib.Event, len(eventIDs))
|
var result []gomatrixserverlib.Event
|
||||||
i := 0
|
i := 0
|
||||||
for ; rows.Next(); i++ {
|
for ; rows.Next(); i++ {
|
||||||
var eventBytes []byte
|
var eventBytes []byte
|
||||||
|
|
@ -86,7 +86,7 @@ func (s *outputRoomEventsStatements) Events(txn *sql.Tx, eventIDs []string) ([]g
|
||||||
result = append(result, ev)
|
result = append(result, ev)
|
||||||
}
|
}
|
||||||
if i != len(eventIDs) {
|
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
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
consumer_uris: ["localhost:9092"]
|
consumer_uris: ["localhost:9092"]
|
||||||
|
|
||||||
# The name of the topic which the sync server will consume events from.
|
# 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.
|
# The database URI to store sync server information.
|
||||||
database: "postgres://dendrite:itsasecret@localhost/syncserver?sslmode=disable"
|
database: "postgres://dendrite:itsasecret@localhost/syncserver?sslmode=disable"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue