aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2022-05-17 13:31:48 +0100
committerKegan Dougal <kegan@matrix.org>2022-05-17 13:31:48 +0100
commitac92e047728efc3d50d6dddbe392ca44afd63a38 (patch)
tree454bcd25c6e65d0aa2775e4fccf02995b2fd051d
parent6de29c1cd23d218f04d2e570932db8967d6adc4f (diff)
Remove debug logging
-rw-r--r--federationapi/consumers/keychange.go5
-rw-r--r--federationapi/consumers/roomserver.go2
-rw-r--r--federationapi/storage/postgres/joined_hosts_table.go5
3 files changed, 1 insertions, 11 deletions
diff --git a/federationapi/consumers/keychange.go b/federationapi/consumers/keychange.go
index 95c9a7fd..6d3cf0e4 100644
--- a/federationapi/consumers/keychange.go
+++ b/federationapi/consumers/keychange.go
@@ -120,7 +120,7 @@ func (t *KeyChangeConsumer) onDeviceKeyMessage(m api.DeviceMessage) bool {
logger.WithError(err).Error("failed to calculate joined rooms for user")
return true
}
- logrus.Infof("DEBUG: %v joined rooms for user %v", queryRes.RoomIDs, m.UserID)
+
// send this key change to all servers who share rooms with this user.
destinations, err := t.db.GetJoinedHostsForRooms(t.ctx, queryRes.RoomIDs, true)
if err != nil {
@@ -129,9 +129,6 @@ func (t *KeyChangeConsumer) onDeviceKeyMessage(m api.DeviceMessage) bool {
}
if len(destinations) == 0 {
- logger.WithField("num_rooms", len(queryRes.RoomIDs)).Debug("user is in no federated rooms")
- destinations, err = t.db.GetJoinedHostsForRooms(t.ctx, queryRes.RoomIDs, false)
- logrus.Infof("GetJoinedHostsForRooms exclude self=false -> %v %v", destinations, err)
return true
}
// Pack the EDU and marshal it
diff --git a/federationapi/consumers/roomserver.go b/federationapi/consumers/roomserver.go
index 7a0816ff..e50ec66a 100644
--- a/federationapi/consumers/roomserver.go
+++ b/federationapi/consumers/roomserver.go
@@ -21,7 +21,6 @@ import (
"github.com/matrix-org/gomatrixserverlib"
"github.com/nats-io/nats.go"
- "github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/matrix-org/dendrite/federationapi/queue"
@@ -166,7 +165,6 @@ func (s *OutputRoomEventConsumer) processMessage(ore api.OutputNewRoomEvent, rew
// expressed as a delta against the current state.
// TODO(#290): handle EventIDMismatchError and recover the current state by
// talking to the roomserver
- logrus.Infof("room %s adds joined hosts: %v removes %v", ore.Event.RoomID(), addsJoinedHosts, ore.RemovesStateEventIDs)
oldJoinedHosts, err := s.db.UpdateRoom(
s.ctx,
ore.Event.RoomID(),
diff --git a/federationapi/storage/postgres/joined_hosts_table.go b/federationapi/storage/postgres/joined_hosts_table.go
index bb6f6bfa..5c95b72a 100644
--- a/federationapi/storage/postgres/joined_hosts_table.go
+++ b/federationapi/storage/postgres/joined_hosts_table.go
@@ -24,7 +24,6 @@ import (
"github.com/matrix-org/dendrite/internal"
"github.com/matrix-org/dendrite/internal/sqlutil"
"github.com/matrix-org/gomatrixserverlib"
- "github.com/sirupsen/logrus"
)
const joinedHostsSchema = `
@@ -112,7 +111,6 @@ func (s *joinedHostsStatements) InsertJoinedHosts(
roomID, eventID string,
serverName gomatrixserverlib.ServerName,
) error {
- logrus.Debugf("FederationJoinedHosts: INSERT %v %v %v", roomID, eventID, serverName)
stmt := sqlutil.TxStmt(txn, s.insertJoinedHostsStmt)
_, err := stmt.ExecContext(ctx, roomID, eventID, serverName)
return err
@@ -121,7 +119,6 @@ func (s *joinedHostsStatements) InsertJoinedHosts(
func (s *joinedHostsStatements) DeleteJoinedHosts(
ctx context.Context, txn *sql.Tx, eventIDs []string,
) error {
- logrus.Debugf("FederationJoinedHosts: DELETE WITH EVENTS %v", eventIDs)
stmt := sqlutil.TxStmt(txn, s.deleteJoinedHostsStmt)
_, err := stmt.ExecContext(ctx, pq.StringArray(eventIDs))
return err
@@ -130,7 +127,6 @@ func (s *joinedHostsStatements) DeleteJoinedHosts(
func (s *joinedHostsStatements) DeleteJoinedHostsForRoom(
ctx context.Context, txn *sql.Tx, roomID string,
) error {
- logrus.Debugf("FederationJoinedHosts: DELETE ALL IN ROOM %v", roomID)
stmt := sqlutil.TxStmt(txn, s.deleteJoinedHostsForRoomStmt)
_, err := stmt.ExecContext(ctx, roomID)
return err
@@ -211,7 +207,6 @@ func joinedHostsFromStmt(
ServerName: gomatrixserverlib.ServerName(serverName),
})
}
- logrus.Debugf("FederationJoinedHosts: SELECT %v => %+v", roomID, result)
return result, rows.Err()
}