You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(datastore): sync pending mutation events with latest synced metadata (#3377)
* apply metadata of incoming mutation event which has pending mutations
* sync mutation event with latest synced version
* add doc for reconcile
* resolve comments
* remove redundant logic
* update test case to verify the latest synced version is applied to api request
* resolve comments
Copy file name to clipboardExpand all lines: AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/AWSMutationDatabaseAdapter/AWSMutationDatabaseAdapter+MutationEventIngester.swift
Copy file name to clipboardExpand all lines: AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/OutgoingMutationQueue.swift
+2-6Lines changed: 2 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,7 @@ final class OutgoingMutationQueue: OutgoingMutationQueueBehavior {
Copy file name to clipboardExpand all lines: AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/SyncMutationToCloudOperation.swift
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ class SyncMutationToCloudOperation: AsynchronousOperation {
Copy file name to clipboardExpand all lines: AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/ReconcileAndLocalSave/ReconcileAndLocalSaveOperation.swift
Copy file name to clipboardExpand all lines: AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/SubscriptionSync/ReconcileAndLocalSave/RemoteSyncReconciler.swift
+12-19Lines changed: 12 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -16,31 +16,24 @@ struct RemoteSyncReconciler {
16
16
case create(RemoteModel)
17
17
case update(RemoteModel)
18
18
case delete(RemoteModel)
19
-
}
20
19
21
-
/// Filter the incoming `remoteModels` against the pending mutations.
22
-
/// If there is a matching pending mutation, drop the remote model.
23
-
///
24
-
/// - Parameters:
25
-
/// - remoteModels: models retrieved from the remote store
26
-
/// - pendingMutations: pending mutations from the outbox
0 commit comments