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

Commit

Permalink
Convert to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Sep 21, 2021
1 parent 857b2d2 commit a30042b
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions synapse/storage/databases/state/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ async def _get_state_for_group_using_inflight_cache(

if state_filter_left_over.types or state_filter_left_over.include_others:
# we need to fire off a request for remaining state
# ostd log contexts?
# REVIEW log contexts?
fired_off_requests.append(
make_deferred_yieldable(
self._get_state_for_group_fire_request(group, state_filter)
Expand All @@ -374,14 +374,12 @@ async def _get_state_for_group_using_inflight_cache(

for request in reusable_requests:
# Observe the requests that we want to re-use
# ostd log contexts?
# REVIEW log contexts?
fired_off_requests.append(make_deferred_yieldable(request.observe()))

# ostd is this right wrt. log context rules?
# REVIEW is this right wrt. log context rules?
gathered = await make_deferred_yieldable(
defer.gatherResults(
fired_off_requests, consumeErrors=True # ostd not sure this is wanted
)
defer.gatherResults(fired_off_requests, consumeErrors=True)
)

# assemble our result.
Expand Down Expand Up @@ -441,11 +439,12 @@ async def _get_state_for_groups(
)
)

# ostd suspicious log context rules
# REVIEW suspicious log context rules
# REVIEW am I right in thinking that we want consumeErrors=True?
# My understanding is that it just prevents logspam, but it will
# still fail on the first error response?
results_from_requests = await make_deferred_yieldable(
defer.gatherResults(
deferred_requests, consumeErrors=False
) # ostd consumeErrors??
defer.gatherResults(deferred_requests, consumeErrors=True)
)

for group, group_result in zip(incomplete_groups, results_from_requests):
Expand Down

0 comments on commit a30042b

Please sign in to comment.