Remove rooms table from federation sender (#1751)

* Remove last sent event ID column from federation sender

* Remove EventIDMismatchError

* Remove the federationsender rooms table altogether, it's useless

* Add migration

* Fix migrations

* Fix migrations
This commit is contained in:
Neil Alexander 2021-02-04 11:52:49 +00:00 committed by GitHub
parent b7e3b81a22
commit 6099379ea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 105 additions and 268 deletions

View file

@ -15,8 +15,6 @@
package types
import (
"fmt"
"github.com/matrix-org/gomatrixserverlib"
)
@ -34,22 +32,6 @@ func (s ServerNames) Len() int { return len(s) }
func (s ServerNames) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func (s ServerNames) Less(i, j int) bool { return s[i] < s[j] }
// A EventIDMismatchError indicates that we have got out of sync with the
// room server.
type EventIDMismatchError struct {
// The event ID we have stored in our local database.
DatabaseID string
// The event ID received from the room server.
RoomServerID string
}
func (e EventIDMismatchError) Error() string {
return fmt.Sprintf(
"mismatched last sent event ID: had %q in database got %q from room server",
e.DatabaseID, e.RoomServerID,
)
}
// tracks peeks we're performing on another server over federation
type OutboundPeek struct {
PeekID string