Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-1001

Async operations should terminate with an error if a fatal session error occurs

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Sync

      All async wait operations - Realm::get_synchronized_realm,wait_for_download_completion, get_state_change_notification will wait forever in the event of a session error. We should instead cancel the wait and propagate the error back to the waiter so that they can handle it. To repro, make an additive schema change when dev mode is off and call wait_for_upload_completion. The logs should say something like:

      ending session with error: integrating changesets failed: additive schema change: adding schema for Realm table "Board", additive changes from clients are restricted when developer mode is disabled (ProtocolErrorCode=201)
      

      But the wait callback will not be invoked.

            Assignee:
            daniel.tabacaru@mongodb.com Daniel Tabacaru
            Reporter:
            nikola.irinchev@mongodb.com Nikola Irinchev
            AD Sync Client
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: