Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure realm subscriptions always fire initial callback with null ChangeSet #28785

Merged
merged 3 commits into from
Jul 9, 2024

Commits on Jul 9, 2024

  1. Configuration menu
    Copy the full SHA
    c8b9c11 View commit details
    Browse the repository at this point in the history
  2. Ensure realm subscriptions always fire initial callback with null `Ch…

    …angeSet`
    
    We expect this to be the case, but it turns out that it [may be
    coalesced](https://www.mongodb.com/docs/realm-sdks/dotnet/latest/reference/Realms.IRealmCollection-1.html#Realms_IRealmCollection_1_SubscribeForNotifications_Realms_NotificationCallbackDelegate__0__Realms_KeyPathsCollection_):
    
    > Notifications are delivered via the standard event loop, and so can't
    > be delivered while the event loop is blocked by other activity. When
    > notifications can't be delivered instantly, multiple notifications may
    > be coalesced into a single notification. This can include the
    > notification with the initial collection.
    
    Rather than struggle with handling this locally every time, let's fix
    the callback at our end to ensure we receive the initial null case.
    
    I've raised concern for the API being a bit silly with realm
    (realm/realm-dotnet#3641).
    peppy committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    2423bbb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ee9e329 View commit details
    Browse the repository at this point in the history