Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1106

Expose more N1QL Query Options

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0
    • N1QL
    • None

    Description

      During review of the possible n1ql query options with Marco we settled on exposing the following from the SDK directly in addition to the ones already present:

      for fine-tuning the request performance (similar to max_parallelism which we expose already)

      • scan_cap: Maximum buffered channel size between the indexer client and the query service for index scans. This parameter controls when to use scan backfill. Use 0 or a negative number to disable.
      • pipeline_batch: Controls the number of items execution operators can batch for Fetch from the KV.
      • pipeline_cap: Maximum number of items each execution operator can buffer between various operators.

      also, if the user knows the request is only ever a select, for security reasons it can make sense to tell the server this thing is readonly and it will prevent mutations from happening.

      • readonly: Controls whether a query can change a resulting recordset.
        If readonly is true, then the following statements are not allowed:

      CREATE INDEX
      DROP INDEX
      INSERT
      MERGE
      UPDATE
      UPSERT

      Note that https://developer.couchbase.com/documentation/server/5.0/settings/query-settings.html has these params documented but the docs are wrong at the time of ticket creation (it shows - and not _ when describing the on the wire representation of the param)

      Attachments

        Issue Links

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

          Activity

            marco.greco Marco Greco added a comment -

            ...and DELETE...

            marco.greco Marco Greco added a comment - ...and DELETE...

            Note that the ints are strings on the wire like max_parallelism

            daschl Michael Nitschinger added a comment - Note that the ints are strings on the wire like max_parallelism

            People

              daschl Michael Nitschinger
              daschl Michael Nitschinger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty