message: Add a comment explaining the history validation that `SyncSession` performs.
diff: @@ -406,6 +406,11 @@ SyncSession::SyncSession(SyncClient& client, std::string realm_path, SyncConfig
  , m_client(client)
  {
  #if REALM_HAVE_SYNC_STABLE_IDS
  + // Sync history validation ensures that the history within the Realm file is in a format that can be used
  + // by the version of realm-sync that we're using. Validation is enabled by default when the binding manually
  + // opens a sync session (via `SyncManager::get_session`), but is disabled when the sync session is opened
  + // as a side effect of opening a `Realm`. In that case, the sync history has already been validated by the
  + // act of opening the `Realm` so it's not necessary to repeat it here.
  if (m_config.validate_sync_history) {
  Realm::Config realm_config;
  realm_config.path = m_realm_path;
  @@ -419,6 +424,8 @@ SyncSession::SyncSession(SyncClient& client, std::string realm_path, SyncConfig
  realm_config.encryption_key.begin());
  }
  + // FIXME: Opening a Realm only to discard it is relatively expensive. It may be preferable to have
  + // realm-sync open the Realm when the `sync::Session` is created since it can continue to use it.
  Realm::get_shared_realm(realm_config); // Throws
  }
  #endif // REALM_HAVE_SYNC_STABLE_IDS
  