Remove debug sql queries

pull/10419/head
Eric Eastwood 2021-07-13 14:34:03 -05:00
parent c05e43bf31
commit 02b1bea935
2 changed files with 2 additions and 27 deletions

View File

@ -65,4 +65,4 @@ if [[ -n "$1" ]]; then
fi
# Run the tests!
go test -v -tags synapse_blacklist,msc2946,msc3083,msc2716,msc2403 -count=1 $EXTRA_COMPLEMENT_ARGS ./tests -run TestBackfillingHistory/parallel/Historical_messages_are_visible_when_joining_on_federated_server
go test -v -tags synapse_blacklist,msc2946,msc3083,msc2716,msc2403 -count=1 $EXTRA_COMPLEMENT_ARGS ./tests -run TestBackfillingHistory

View File

@ -673,41 +673,16 @@ class EventFederationWorkerStore(EventsWorkerStore, SignatureWorkerStore, SQLBas
)
def get_oldest_events_with_depth_in_room_txn(self, txn, room_id):
sqlAsdf = "SELECT * FROM insertion_event_edges as i"
txn.execute(sqlAsdf)
logger.info("wfeafewawafeawg %s", dict(txn))
sqlAsdf = "SELECT * FROM insertion_event_edges as i WHERE i.room_id = ?"
txn.execute(sqlAsdf, (room_id,))
logger.info("awfeawefw %s", dict(txn))
sql = (
"SELECT i.insertion_event_id, MAX(e.depth) FROM events as e"
# " INNER JOIN event_edges as g"
# " ON g.event_id = e.event_id"
# " INNER JOIN event_backward_extremities as b"
# " ON g.prev_event_id = b.event_id"
# TODO
" INNER JOIN insertion_event_edges as i"
" ON e.event_id = i.insertion_prev_event_id"
" WHERE i.room_id = ?"
" GROUP BY i.insertion_event_id"
)
txn.execute(sql, (room_id,))
sql = (
"SELECT b.event_id, MAX(e.depth) FROM events as e"
" INNER JOIN event_edges as g"
" ON g.event_id = e.event_id"
" INNER JOIN event_backward_extremities as b"
" ON g.prev_event_id = b.event_id"
# TODO
# " INNER JOIN insertion_event_edges as i"
# " ON g.event_id = i.insertion_prev_event_id"
" WHERE b.room_id = ? AND g.is_state is ?"
" GROUP BY b.event_id"
)
txn.execute(sql, (room_id, False))
return dict(txn)