diff --git a/AmplifyPlugins/DataStore/AWSDataStoreCategoryPlugin/Sync/MutationSync/AWSMutationDatabaseAdapter/AWSMutationDatabaseAdapter+MutationEventIngester.swift b/AmplifyPlugins/DataStore/AWSDataStoreCategoryPlugin/Sync/MutationSync/AWSMutationDatabaseAdapter/AWSMutationDatabaseAdapter+MutationEventIngester.swift index 4df289c1a2..477f74abf5 100644 --- a/AmplifyPlugins/DataStore/AWSDataStoreCategoryPlugin/Sync/MutationSync/AWSMutationDatabaseAdapter/AWSMutationDatabaseAdapter+MutationEventIngester.swift +++ b/AmplifyPlugins/DataStore/AWSDataStoreCategoryPlugin/Sync/MutationSync/AWSMutationDatabaseAdapter/AWSMutationDatabaseAdapter+MutationEventIngester.swift @@ -202,7 +202,11 @@ extension AWSMutationDatabaseAdapter: MutationEventIngester { completionPromise: @escaping Future.Promise) { log.verbose("\(#function) mutationEvent: \(mutationEvent)") - storageAdapter.save(mutationEvent, condition: nil) { result in + var eventToPersist = mutationEvent + if nextEventPromise != nil { + eventToPersist.inProcess = true + } + storageAdapter.save(eventToPersist, condition: nil) { result in switch result { case .failure(let dataStoreError): self.log.verbose("\(#function): Error saving mutation event: \(dataStoreError)")