Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-2825

Missing _attachments metadata when pushing updated docs to Sync Gateway

    XMLWordPrintable

Details

    Description

      Here is the scenario:

      1. Create a doc with a blob and save into a db.
      2. Push to SG.
      3. Get the same doc from db and update the doc with a key and string value (without changing blob).
      4. Push to SG again.

      In step 4, the rev body doesn't include the _attachments as the result from the Wireshark here:

      Properties: Profile:rev:id:doc1:rev:2-1c3e64b7cbb00795fa77c65e8052f31ecbe85942:sequence:2:noconflicts:1:history:1-b57270efb7cd24d0822a96b74e5770dc1116b561 
       
      Message Body: {"Blob":{"length":12,"digest":"sha1-qDJGTAqLun7gBtQRZma9L7+PYYA=","content_type":"text/plain","@type":"blob"},"address":"1 Main st","John Doe":"name"}

      The problem of this behavior is that when pulling the doc back (e.g. to another database), the doc cannot be pulled. There is an error on SG side as follows:

      2022-02-16T16:00:05.818-08:00 [INF] SyncMsg: c:[3e8c3903] #3: Type:getAttachment Digest:sha1-qDJGTAqLun7gBtQRZma9L7+PYYA= 
      2022-02-16T16:00:05.818-08:00 [INF] SyncMsg: c:[3e8c3903] #3: Type:getAttachment   --> 403 Attachment's doc not being synced Time:219.167µs 

      Testing Platforms:
      CBL-iOS 3.0.0 RC2
      SG 2.8.3(12;e54a627) or SG 3.0.0(541;46803d1)

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Jayahari.Vavachan Jay Vavachan
              pasin Pasin Suriyentrakorn
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty