mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Add depth and received_ts to forward_extremities admin API response
Also add a warning on the admin API documentation. Signed-off-by: Jason Robinson <jasonr@matrix.org>
This commit is contained in:
parent
c177faf5a9
commit
930ba00971
@ -535,7 +535,9 @@ A response as follows will be returned:
|
|||||||
"results": [
|
"results": [
|
||||||
{
|
{
|
||||||
"event_id": "$M5SP266vsnxctfwFgFLNceaCo3ujhRtg_NiiHabcdefgh",
|
"event_id": "$M5SP266vsnxctfwFgFLNceaCo3ujhRtg_NiiHabcdefgh",
|
||||||
"state_group": 439
|
"state_group": 439,
|
||||||
|
"depth": 123,
|
||||||
|
"received_ts": 1611263016761
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -543,6 +545,10 @@ A response as follows will be returned:
|
|||||||
|
|
||||||
## Deleting forward extremities
|
## Deleting forward extremities
|
||||||
|
|
||||||
|
**WARNING**: Please ensure you know what you're doing and have read
|
||||||
|
the related issue [#1760](https://github.com/matrix-org/synapse/issues/1760).
|
||||||
|
Under no situations should this API be executed as an automated maintenance task!
|
||||||
|
|
||||||
If a room has lots of forward extremities, the extra can be
|
If a room has lots of forward extremities, the extra can be
|
||||||
deleted as follows:
|
deleted as follows:
|
||||||
|
|
||||||
|
@ -86,9 +86,10 @@ class EventForwardExtremitiesStore(SQLBaseStore):
|
|||||||
|
|
||||||
def get_forward_extremities_for_room_txn(txn):
|
def get_forward_extremities_for_room_txn(txn):
|
||||||
sql = """
|
sql = """
|
||||||
SELECT event_id, state_group
|
SELECT event_id, state_group, depth, received_ts
|
||||||
FROM event_forward_extremities
|
FROM event_forward_extremities
|
||||||
NATURAL JOIN event_to_state_groups
|
NATURAL JOIN event_to_state_groups
|
||||||
|
NATURAL JOIN events
|
||||||
WHERE room_id = ?
|
WHERE room_id = ?
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user