limit total timeout for get_missing_events to 10s #1744

Merged
merged 2 commits into from Jan 5, 2017

Projects

None yet

2 participants

@ara4n
Member
ara4n commented Dec 31, 2016 edited

timeout calls to get_missing_events from the federation client after 10s rather than the current 5 minutes. should improve the workaround for #1733 and #1729 some more.

@ara4n ara4n limit total timeout for get_missing_events to 10s
555d702
@NegativeMjark NegativeMjark was assigned by ara4n Dec 31, 2016
@NegativeMjark
Contributor

It might be worth noting in the comment that this disables HTTP client retries entirely.
https://github.com/matrix-org/synapse/blob/master/synapse/http/matrixfederationclient.py#L189

Also worth noting in the comment that this increases the chances of falling back to fetching state, which curiously isn't guarded by the same lock as the get_missing_events.

Also might be worth mentioning in the comment that we don't want to block for a long time because we are holding a lock on the room that could block other transactions that needed to fetch missing events.

Other than lack of comments LGTM.

@ara4n
Member
ara4n commented Jan 5, 2017

will fix #1741 when merged

@ara4n ara4n fix comment
8e82611
@ara4n
Member
ara4n commented Jan 5, 2017

@NegativeMjark have updated the comment - PTAL

@NegativeMjark
Contributor

LGTM

@NegativeMjark NegativeMjark merged commit 5175094 into develop Jan 5, 2017

2 of 6 checks passed

Sytest Dendron (Merged PR) Build finished.
Details
Sytest Postgres (Merged PR) Build started sha1 is merged.
Details
Sytest SQLite (Commit) Build #2188 origin/matthew/timeout_get_missing_events in progress...
Details
Sytest SQLite (Merged PR) Build started sha1 is merged.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment