You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix DontAnnounce policy drops documents synced by clients
Problem: when we receive a sync message for a document which we don't
have in storage and for whom the AnnouncePolicy returns DontAnnounce
then we erroneously decide that the document is unavailable even if the
incoming sync message contains data about the document. This is because
we fail to process pending sync messages once the load has completed if
we don't have the document available or any connected peers who we could
request from.
Solution: process pending sync messages before deciding that the
document is unavailable.
Whilst I'm here I also cleaned up the logic around the phase transition
during load to make it more consistent with the rest of the phase
transitions and easier to read. One important improvement is that if the
document state changes mutliple times in one turn of a document actor,
we only notify of the last status. This is important because it means
that if a document transitions from loading through not found and into
requesting in the same turn (which can happen if a load completes after
receiving a sync message) then we don't notify the hub of the not found
state. This is in turn important because notifying the hub of a not
found state causes any outstanding find commands to complete with
`None`.
Fixes: #85
Co-authored-by: Carlos Scheidegger <285675+cscheid@users.noreply.github.com>
Co-authored-by: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com>
0 commit comments