[3.1.6 Backport] Tweak logging around import of JSON but not JSON object docs
Description
CB Server document data types are determined based on whether the body is valid JSON. This includes non-object JSON types, like arrays, strings, numbers.
Documents that CB Server determined was not a binary data type, but are also not a JSON object (e.g. arrays, numbers, strings) are handled differently by SG import than just binary documents.
CB Server document data types are determined based on whether the body is valid JSON. This includes non-object JSON types, like arrays, strings, numbers.
Documents that CB Server determined was not a binary data type, but are also not a JSON object (e.g. arrays, numbers, strings) are handled differently by SG import than just binary documents.
https://couchbasecloud.atlassian.net/browse/CBG-3332#icft=CBG-3332 made SG warn when encountering a JSON data type document that is not a JSON object appear over DCP, even if there is no pre-existing
_sync
metadata present with a misleading log message.For true binary (non-JSON) docs (
MemcachedDataTypeRaw
):Nothing required. Existing info loging covers.
For JSON but not JSON object docs:
If no existing _sync data present:
Similar info log to describe why we're not importing this document.
It's valid that customers have counter documents, etc. that they don't ever want importing by SG.
If there is _sync data present:
Detect this case and continue to warn.
Implies the document should be mobile-aware but can no longer be (because of the body being changed to something other than a JSON object)
Sync metadata should be removed from the document if it is no longer needed for CB Mobile.