Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Simperium sync issues #1598

Merged
merged 1 commit into from
Oct 1, 2019
Merged

Fix: Simperium sync issues #1598

merged 1 commit into from
Oct 1, 2019

Commits on Oct 1, 2019

  1. This PR changes the way that the editor's contents and Simperium

    interact; it's dependent on the changes made in simperium@1.0.0.
    
    Previously we held content in the editor component and would delay
    sending those changes to the underlying Simperium client library
    (node-simperium) until the timeout flushed. This made for awkward
    interactions when we would received remote updates from the server that
    happened before that timeout flushed; this led to note corruption.
    
    After this PR we are announcing immediately to the underlying client
    library when we make changes and telling it (via { sync: false } in
    noteBucket.update()) that it's okay to wait to synchronize those changes
    with the server. We still maintain our debounce, but instead of sending
    the editor component's text on the timeout we more simply tell the
    underlying library to flush its changes (via noteBucket.touch()). The
    effect is that we've removed a source of concurrency bugs with those
    remote updates.
    
    After this PR we should be removing a number of related data loss and
    note corruption issues all relating to the interplay of queued and
    received changes.
    beaucollins authored and dmsnell committed Oct 1, 2019
    Configuration menu
    Copy the full SHA
    8582e4b View commit details
    Browse the repository at this point in the history