Skip to content

Commit

Permalink
[REVERT] Add in metrics counter to prove this gets hit
Browse files Browse the repository at this point in the history
  • Loading branch information
realtyem committed Oct 25, 2023
1 parent 71d8645 commit 98f253e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions synapse/storage/databases/main/event_federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
"The number of events in the inbound federation staging that have been "
"pruned due to the queue getting too long",
)
excluded_zeros_from_auth_chain_query = Counter(
"synapse_temp_auth_chain_zero_sequence", ""
)

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -305,6 +308,8 @@ def _get_auth_chain_ids_using_cover_index_txn(
max_sequence_result = max(seq_no - 1, chains.get(chain_id, 0))
if max_sequence_result > 0:
chains[chain_id] = max_sequence_result
else:
excluded_zeros_from_auth_chain_query.inc()

# Now for each chain we figure out the maximum sequence number reachable
# from *any* event ID. Events with a sequence less than that are in the
Expand Down

0 comments on commit 98f253e

Please sign in to comment.