Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-30487

Collections: Create a collection with max_ttl

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • couchbase-bucket
    • Security Level: Public
    • None

    Description

      update: this MB covers create only, a separate MB tracks the ability to modify collection max_ttl (MB-31806)

      To satisfy Collections product requirements a collection can define its own max-TTL (document maximum time to live). A collection that does not define a max-TTL will use the value from the bucket configuration string “max_ttl”.

      A collection can have the TTL defined by adding the following entry to the collection entry structure (where n is a value).

      “max_ttl”: n

      Collection max_ttl behaves the same as the existing bucket max_ttl feature.

      To correctly implement this feature we need.

      1) Space in the VB::ManifestEntry to store the TTL and methods to get it from a CachingReadHandle
      2) Wire it into the existing max TTL code (ideally, may not be possible unless we do many collection map lookups per set)
      3) DCP needs to replicate the collection TTL as part of a DCP system event
      4) If we support changes to the TTL we also need a new event which replicates collection config changes
      4.5) The eraser code must drop these new events if the collection is dropped

      Attachments

        Issue Links

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

          Activity

            Just for confirmation, will this be overridable in both directions at the collection level, or will the bucket level provide a max for all collections (similar to the pattern of "bucket level max_ttl" vs "operation ttl")?

            e.g. if I have a bucket level max_ttl of 10 days, can I set a collection level max_ttl of 15 days, or can this only be set as high as 10 days?

            James Flather James Flather added a comment - Just for confirmation, will this be overridable in both directions at the collection level, or will the bucket level provide a max for all collections (similar to the pattern of "bucket level max_ttl" vs "operation ttl")? e.g. if I have a bucket level max_ttl of 10 days, can I set a collection level max_ttl of 15 days, or can this only be set as high as 10 days?

            Build couchbase-server-6.5.0-1583 contains kv_engine commit 622178d with commit message:
            MB-30487: [1/2] Accept max_ttl field in collection entry

            build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-1583 contains kv_engine commit 622178d with commit message: MB-30487 : [1/2] Accept max_ttl field in collection entry

            Build couchbase-server-6.5.0-1584 contains kv_engine commit a757842 with commit message:
            MB-30487: [2/2] Enforce the collection max_ttl

            build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-1584 contains kv_engine commit a757842 with commit message: MB-30487 : [2/2] Enforce the collection max_ttl
            jwalker Jim Walker added a comment -

            KV now allows create collection with a TTL and it is enforced

            jwalker Jim Walker added a comment - KV now allows create collection with a TTL and it is enforced

            People

              jwalker Jim Walker
              jwalker Jim Walker
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty