Uploaded image for project: 'Couchbase Spark Connector'
  1. Couchbase Spark Connector
  2. SPARKC-82

N1QLRelation should refuse to infer bucket name when there is more than 1 bucket

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Major
    • 2.3.0
    • 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.

      Attachments

        Activity

          People

            graham.pople Graham Pople
            david.nault David Nault
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty