-
Notifications
You must be signed in to change notification settings - Fork 202
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
fix(datastore): observequery local only collect #3214
Conversation
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## main #3214 +/- ##
==========================================
+ Coverage 64.74% 64.76% +0.02%
==========================================
Files 1090 1090
Lines 36988 36998 +10
==========================================
+ Hits 23948 23962 +14
+ Misses 13040 13036 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 10 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
...yPlugins/DataStore/Sources/AWSDataStorePlugin/Subscribe/DataStoreObserveQueryOperation.swift
Outdated
Show resolved
Hide resolved
.byTimeOrCount( | ||
self.serialQueue, | ||
self.itemsChangedPeriodicPublishTimeInSeconds, | ||
self.shouldBatchDuringSync ? self.itemsChangedMaxSize : 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we can open up an issue on the other DataStore repos to let them verify if they have the same behavior, and if so they can do the similar change here
Issue #
Description
DataStore.observeQuery(...)
has some internal logic to batch snapshots received based on total count or time elapsed while syncing. This logic is applied whenDataStore
thinks it is hasn't yet completed syncing.When
DataStore
is in local only mode (i.e. whenAWSAPIPlugin
isn't being used), it is never "completed syncing", leading to the same throttling logic.This change ensures that the throttling / collect logic is not applied when
DataStore
is in local only mode.General Checklist
Documentation update for the change if requiredGiven When Then
inline code documentation and are named accordinglytestThing_condition_expectation()
If breaking change, documentation/changelog update with migration instructionsBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.