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

CBL doesn't purge channel removals when removal revision already exists in CBL

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.0
    • 3.0
    • LiteCore
    • Security Level: Public
    • None
    • Pasin 48
    • 2

    Description

      Lithium has a feature of handling revocation of channel access:

      https://docs.google.com/document/d/14gawyt9lcHYUlCh0APUt-7V6M6Kkk0zoXi7GOfYiMLM/edit#heading=h.8yekawi4x61d

      however, the feature will mainly focus on purging docs while the docs owner (user) leaves the channel of the docs belong to. 

      I have the following scenarios observed in 2.8 (as well as 2.8.x) need to be also covered by Lithium channel access improvement:

      1. create a doc on CBL with channels, replicate (continuous=true) the doc to SGW, on CBL remove all channels the doc was assigned, the doc gets auto purged on CBL (currently the doc stay with empty channel data)
      2. create a doc on CBL with channels, replicate (continuous=true) the doc to SGW, on SGW remove all channels the doc was assigned, the doc gets auto purged on CBL (currently docs stay with empty channel data)
      3. create a doc on SGW with channels, replicate (continuous=true) the doc to CBL, on SGW remove all channels the doc was assigned, the doc gets auto purged on CBL (currently it works expected)
      4. create a doc on SGW with channels, replicate (continuous=true) the doc to CBL, on CBL remove all channels the doc was assigned, the doc gets auto purged on CBL (currently docs stay with empty channel data)

      Discussed my observations with Adam and Pasin Suriyentrakorn , will confirm if a CBL doc with empty channel should be purged or not. 

      Attachments

        Issue Links

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

          Activity

            adamf Adam Fraser added a comment -

            Pasin Suriyentrakorn The deleted flag is only used to indicate tombstones, and will continue to only be used in that way. The existing removed:true flag will continue to be used when a new revision of a document leaves a channel being replicated. The new revoked:true flag will be used to notify a client that it's lost access to an existing revision.

            I think it's useful to continue think about these as three separate flags, even if the transport layer is sending these as a single bitfield property (which I believe is what you're talking about when you say the deleted property will be set).

            adamf Adam Fraser added a comment - Pasin Suriyentrakorn The deleted flag is only used to indicate tombstones, and will continue to only be used in that way. The existing removed:true flag will continue to be used when a new revision of a document leaves a channel being replicated. The new revoked:true flag will be used to notify a client that it's lost access to an existing revision. I think it's useful to continue think about these as three separate flags, even if the transport layer is sending these as a single bitfield property (which I believe is what you're talking about when you say the deleted property will be set).

            This is fixed with the code that handles revoked / removed revisions when using the BLIP_V3 protocol (CBL 3.0 and SG 3.0).

            pasin Pasin Suriyentrakorn added a comment - This is fixed with the code that handles revoked / removed revisions when using the BLIP_V3 protocol (CBL 3.0 and SG 3.0).

            will change the status to resolved, then close it after it gets verified.

            eunice.huang Eunice Huang (Inactive) added a comment - will change the status to resolved, then close it after it gets verified.

            dev fixed, qe will verify it

            eunice.huang Eunice Huang (Inactive) added a comment - dev fixed, qe will verify it

            verified in the latest lithium test job

            eunice.huang Eunice Huang (Inactive) added a comment - verified in the latest lithium test job

            People

              eunice.huang Eunice Huang (Inactive)
              eunice.huang Eunice Huang (Inactive)
              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