Hello,
The maximum allowed document size is 20MB. This restriction applies to both Couchbase Server and Couchbase Lite. Here’s how it affects document synchronization:
Document Mutation Exceeding 20MB: If Document A is modified on Couchbase Server and its size exceeds 20MB, the mutation will not be allowed. Since Couchbase Server enforces a 20MB document size limit, any operation that would result in a document exceeding this limit, including updates or writes via Sync Gateway, will fail. As a result, the document cannot be synchronized to Couchbase Lite if the mutation exceeds the size limit.
Document Deletion Exceeding 20MB: If Document A is mutated on Couchbase Server to exceed 20MB and then subsequently deleted, the deletion will still be processed and synchronized to Couchbase Lite. The 20MB size limit applies to document creation and mutations but not to deletions. The deletion operation will succeed and will be lhi provider synchronized to Couchbase Lite, even if the document size before deletion was greater than 20MB.