Failed to integrate download with non-retryable error: error applying downloaded changesets to mongodb

My app is getting integration errors and does not sync with Atlas.

Here is the error message:

Failed to integrate download with non-retryable error: error applying downloaded changesets to mongodb: error applying array operations as pure set, ArrayInsert.prior_size was 12 but built-up array was only of length 13

Some details:
My macOS writer app processed CSV files and inserted 230k documents. Although the sync was very slow, the Realm server was writing to Atlas. But after writing about 190k documents, it started getting the integration error. My reader app can connect to the server. But it doesn’t seem to download the data.

What would you recommend to fix this? Should I terminate the sync, delete the local file, and reinsert the remaining documents?

@lonesometraveler What SDK and version are you using?

I use realm/realm-cocoa v10.4.0.

@lonesometraveler OK - thats the latest, can you try terminating/re-enabling sync and see if you can reproduce the error again?

After terminating and reenabling sync, I am getting TranslatorFatalErrors.

Error:

initial sync failed: initial sync worker for ns=‘duet.Song’ stopped with error: failed to insert change into history during initial sync of duet.Song after copying 0 documents: error adding changes for ns=‘duet.Song’ to client history: context deadline exceeded
Source:

Error syncing MongoDB write

Error:

initial sync failed: initial sync worker for ns=‘duet.Artist’ stopped with error: failed to insert change into history during initial sync of duet.Artist after copying 0 documents: error adding changes for ns=‘duet.Artist’ to client history: connection(cluster0-shard-00-02.jryma.mongodb.net:27017[-6619474]) incomplete read of message header: context deadline exceeded
Source:

Error syncing MongoDB write

@Ian_Ward Besides TranslatorFatalError, the log is now showing OtherClientError.

Error:

Ending session with error: integrating changesets failed: error inserting history entry batch for transaction batch ID 5fd8a342355bca1678eb5eb5: (NoSuchTransaction) Transaction 1 has been aborted. (ProtocolErrorCode=101)

Source:

Ending sync session to MongoDB

Is there anything I can do to fix this?

@lonesometraveler Can you share your Realm Cloud URL please so we can investigate ?

@Ian_Ward Here is the URL.
https://realm.mongodb.com/groups/5f8cd3781105f71e2433edd7/apps/5fd38bb899b7e23151cf0d79/dashboard

Thank you very much for your help.

@lonesometraveler You’re out of storage bud and trying to sync too much data - see logs:

initial sync failed: initial sync worker for ns=‘duet.Song’ stopped with error: failed to insert change into history during initial sync of duet.Song after copying 64910 documents: error adding changes for ns=‘duet.Song’ to client history: (AtlasError) error incrementing the version counter for (appID=“5fd38bb899b7e23151cf0d79”, fileIdent=1); (AtlasError) you are over your space quota, using 517 MB of 512 MB

@Ian_Ward Thanks! Upgrading the cluster and terminating/reenabling sync fixed the issue.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.