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

Better handle retries when refreshing Sync Session access token

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: ObjectStore

      Right now we use a simple 10-second retry rule: https://github.com/realm/realm-object-store/blob/v10/src/sync/sync_session.cpp#L284

      This is suboptimal in a number of scenarios:

      • In case there is a persistent error, e.g. if the user has been disabled on the server.
      • If the device is offline.

      Suggested changes:

      1) Use some form of exponential backoff to avoid draining the battery

      2) Log that this is happening, seeĀ https://github.com/realm/realm-object-store/issues/1037

      3) Hook into `SyncManager::shared().reconnect()` so calling this will also reset the the timer in 1)

            Assignee:
            james.stone@mongodb.com James Stone
            Reporter:
            christian.melchior@mongodb.com Christian Melchior (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: