Details
-
Task
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
Description
When N1QLRelation is created with a null bucket name, it uses the first bucket defined in the config. The problem is that the bucket order is unspecified, since the buckets are initially configured using the keys of a ConcurrentHashMap.
Contrast this with CouchbaseConnection.bucket, which throws an IllegalStateException if the bucket name is not specified and there is not exactly one bucket.
For consistency, recommend modifying N1QLRelation to behave similarly to CouchbaseConnection.bucket.
CAVEAT: This would be a breaking change for users who depend on the unspecified bucket order. That is, programs that use N1QLRelation, do not specify a bucket name, and configure more than 1 bucket.