Creating mobile tombstone for existing CBS tombstone causes loop
Description
SG 2.8.1 includes to avoid creating empty document bodies when creating a mobile tombstone for a previously non-existent document.
If the updated handling is applied to an existing, non-purged Couchbase Server tombstone that does not have a mobile xattr associated with it, Sync Gateway fails to use the cas from the existing tombstone, and so hits a cas error when writing the mobile tombstone.
The net result is Sync Gateway going into an infinite loop attempting to retry the CAS failure.
SG 2.8.1 includes to avoid creating empty document bodies when creating a mobile tombstone for a previously non-existent document.
If the updated handling is applied to an existing, non-purged Couchbase Server tombstone that does not have a mobile xattr associated with it, Sync Gateway fails to use the cas from the existing tombstone, and so hits a cas error when writing the mobile tombstone.
The net result is Sync Gateway going into an infinite loop attempting to retry the CAS failure.