Better handle retries when refreshing Sync Session access token

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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: 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
              Reporter:
              Christian Melchior (Inactive)
              Archiver:
              Marc Greenfield

                Created:
                Updated:
                Resolved:
                Archived: