Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 02b1bea

Browse files
committed
Remove debug sql queries
1 parent c05e43b commit 02b1bea

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

scripts-dev/complement.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ if [[ -n "$1" ]]; then
6565
fi
6666

6767
# Run the tests!
68-
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
68+
go test -v -tags synapse_blacklist,msc2946,msc3083,msc2716,msc2403 -count=1 $EXTRA_COMPLEMENT_ARGS ./tests -run TestBackfillingHistory

synapse/storage/databases/main/event_federation.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -673,41 +673,16 @@ async def get_oldest_events_with_depth_in_room(self, room_id):
673673
)
674674

675675
def get_oldest_events_with_depth_in_room_txn(self, txn, room_id):
676-
sqlAsdf = "SELECT * FROM insertion_event_edges as i"
677-
txn.execute(sqlAsdf)
678-
logger.info("wfeafewawafeawg %s", dict(txn))
679-
680-
sqlAsdf = "SELECT * FROM insertion_event_edges as i WHERE i.room_id = ?"
681-
txn.execute(sqlAsdf, (room_id,))
682-
logger.info("awfeawefw %s", dict(txn))
683-
684-
sql = (
685-
"SELECT i.insertion_event_id, MAX(e.depth) FROM events as e"
686-
# " INNER JOIN event_edges as g"
687-
# " ON g.event_id = e.event_id"
688-
# " INNER JOIN event_backward_extremities as b"
689-
# " ON g.prev_event_id = b.event_id"
690-
# TODO
691-
" INNER JOIN insertion_event_edges as i"
692-
" ON e.event_id = i.insertion_prev_event_id"
693-
" WHERE i.room_id = ?"
694-
" GROUP BY i.insertion_event_id"
695-
)
696-
697-
txn.execute(sql, (room_id,))
698-
699676
sql = (
700677
"SELECT b.event_id, MAX(e.depth) FROM events as e"
701678
" INNER JOIN event_edges as g"
702679
" ON g.event_id = e.event_id"
703680
" INNER JOIN event_backward_extremities as b"
704681
" ON g.prev_event_id = b.event_id"
705-
# TODO
706-
# " INNER JOIN insertion_event_edges as i"
707-
# " ON g.event_id = i.insertion_prev_event_id"
708682
" WHERE b.room_id = ? AND g.is_state is ?"
709683
" GROUP BY b.event_id"
710684
)
685+
711686
txn.execute(sql, (room_id, False))
712687

713688
return dict(txn)

0 commit comments

Comments
 (0)