This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change
1
+ Faster joins: tag `v2/send_join/` requests to indicate if they served a partial join response.
Original file line number Diff line number Diff line change 62
62
run_in_background ,
63
63
)
64
64
from synapse .logging .opentracing import (
65
+ SynapseTags ,
65
66
log_kv ,
67
+ set_tag ,
66
68
start_active_span_from_edu ,
67
69
tag_args ,
68
70
trace ,
@@ -678,6 +680,10 @@ async def on_send_join_request(
678
680
room_id : str ,
679
681
caller_supports_partial_state : bool = False ,
680
682
) -> Dict [str , Any ]:
683
+ set_tag (
684
+ SynapseTags .SEND_JOIN_RESPONSE_IS_PARTIAL_STATE ,
685
+ caller_supports_partial_state ,
686
+ )
681
687
await self ._room_member_handler ._join_rate_per_room_limiter .ratelimit ( # type: ignore[has-type]
682
688
requester = None ,
683
689
key = room_id ,
Original file line number Diff line number Diff line change @@ -322,6 +322,11 @@ class SynapseTags:
322
322
# The name of the external cache
323
323
CACHE_NAME = "cache.name"
324
324
325
+ # Boolean. Present on /v2/send_join requests, omitted from all others.
326
+ # True iff partial state was requested and we provided (or intended to provide)
327
+ # partial state in the response.
328
+ SEND_JOIN_RESPONSE_IS_PARTIAL_STATE = "send_join.partial_state_response"
329
+
325
330
# Used to tag function arguments
326
331
#
327
332
# Tag a named arg. The name of the argument should be appended to this prefix.
You can’t perform that action at this time.
0 commit comments