Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-575

Error when using config cache with multiple buckets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • 2.6.1
    • None
    • None
    • None
    • 1

    Description

      We have a few different buckets which we are accessing over the same connection using the php-couchbase extension (version 2.6.0). That all works correct, but when adding `?config_cache=/tmp/couchbase-config-cache` to our connection string, it correctly creates the cache file, but when trying to access another bucket we get an error:

      [cb,EROR] (bc_file L:127 I:284968009) (cache=/tmp/couchbase-config-cache) Bucket name in file is different from the one requested

      This suggests that the config_cache option is not supported when using multiple buckets over a connection. Inspecting the cache file confirms this as the bucket name is contained in the "name" field.

      I could work around this by creating a different Cluster object per bucket I'd like to open in PHP, but that feels weird, since I'm enabling config cache to reduce the number of connections and this workaround probably increases it in our situation.

      I think it should either create a cache file per bucket or should support multiple different buckets in one file. Or the config_cache should move to the bucket configuration somehow.

      It seems there is some code in `src/bucketconfig/bc_file.cc` in the `mkcachefile` function which suggests that different files per bucket can be created, but I have no clue how to enable that.

      Attachments

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

        Activity

          People

            avsej Sergey Avseyev
            demontpx Bert Hekman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty