Details
-
Bug
-
Resolution: Won't Do
-
Major
-
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.