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

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

    • 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
            Archiver:
            marc.greenfield@mongodb.com Marc Greenfield

              Created:
              Updated:
              Resolved:
              Archived: