Skip to content
Snippets Groups Projects
  • Erik Johnston's avatar
    1ce59d7b
    Fix sync waiting for an invalid token from the "future" (#17386) · 1ce59d7b
    Erik Johnston authored
    Fixes https://github.com/element-hq/synapse/issues/17274, hopefully.
    
    Basically, old versions of Synapse could advance streams without
    persisting anything in the DB (fixed in #17229). On restart those
    updates would get lost, and so the position of the stream would revert
    to an older position. If this happened across an upgrade to a later
    Synapse version which included #17215, then sync could get blocked
    indefinitely (until the stream advanced to the position in the token).
    
    We fix this by bounding the stream positions we'll wait for to the
    maximum position of the underlying stream ID generator.
    1ce59d7b
    History
    Fix sync waiting for an invalid token from the "future" (#17386)
    Erik Johnston authored
    Fixes https://github.com/element-hq/synapse/issues/17274, hopefully.
    
    Basically, old versions of Synapse could advance streams without
    persisting anything in the DB (fixed in #17229). On restart those
    updates would get lost, and so the position of the stream would revert
    to an older position. If this happened across an upgrade to a later
    Synapse version which included #17215, then sync could get blocked
    indefinitely (until the stream advanced to the position in the token).
    
    We fix this by bounding the stream positions we'll wait for to the
    maximum position of the underlying stream ID generator.