Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-1863

Add Flushing or Deleting a Collection logic

    XMLWordPrintable

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha
    • 3.0.0
    • library
    • 1
    • SDK38: Redaction,Releases,Test, SDK40: Verif2,Bugs,Docs,Retry, SDK42: Verif2,Retr,RTO,Circuit, SDK44: βref(1),CombT,Migration, SDK48: βref(2),CombT,Migr., SDK50: βref(2),CombT,Migr., SDK52: B/GA, Doc:Migr/Stngs/Co, SDK1: GA and Priority List

    Attachments

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

      Activity

        jmorris Jeff Morris added a comment -

        Putting back into back log pending more discovery.

        jmorris Jeff Morris added a comment - Putting back into back log pending more discovery.
        jmorris Jeff Morris added a comment - - edited

        Flushing or Deleting a Collection
        As part of the public interface, collections expose a collection name that is used to open a collection and an associated underlying collection id or CID that the client Leb128 encodes and appends to the first two bytes of the key (transparently). While the name is guaranteed to be unique for a given Bucket, Scope and Collection, the CID is auto generated internally by the server and can change for a given name if the collection is flushed or deleted. In order to support collections and changing CIDs, these steps must be followed:

        The first time a collection name is encountered, the GET_ID command should be used to fetch the CID and cache it for reuse. If not found is returned, an error should be propagated to the user.
        If the name is valid, continue along with the operation.
        On future operations, the client should use the cached CID. If an error is returned by the server indicating that the CID is invalid, a GET_ID should be executed and the new CID retrieved and cached along with the operation being resent. Note that other collections should NOT be invalidated by this GET_ID call, as they are likely to still be accurate.
        If an error occurs, the client should propagate and error message to the user indicating that collection cannot be found.

        https://docs.couchbase.com/server/6.5/developer-preview/collections/manage-collections-with-rest.html
        https://docs.couchbase.com/server/6.5/developer-preview/collections/manage-collections-with-cli.html

        jmorris Jeff Morris added a comment - - edited Flushing or Deleting a Collection As part of the public interface, collections expose a collection name that is used to open a collection and an associated underlying collection id or CID that the client Leb128 encodes and appends to the first two bytes of the key (transparently). While the name is guaranteed to be unique for a given Bucket, Scope and Collection, the CID is auto generated internally by the server and can change for a given name if the collection is flushed or deleted. In order to support collections and changing CIDs, these steps must be followed: The first time a collection name is encountered, the GET_ID command should be used to fetch the CID and cache it for reuse. If not found is returned, an error should be propagated to the user. If the name is valid, continue along with the operation. On future operations, the client should use the cached CID. If an error is returned by the server indicating that the CID is invalid, a GET_ID should be executed and the new CID retrieved and cached along with the operation being resent. Note that other collections should NOT be invalidated by this GET_ID call, as they are likely to still be accurate. If an error occurs, the client should propagate and error message to the user indicating that collection cannot be found. https://docs.couchbase.com/server/6.5/developer-preview/collections/manage-collections-with-rest.html https://docs.couchbase.com/server/6.5/developer-preview/collections/manage-collections-with-cli.html

        People

          jmorris Jeff Morris
          jmorris Jeff Morris
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved:

            Gerrit Reviews

              There are no open Gerrit changes

              PagerDuty