Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-59437

[Guardrails] Query doesn't return guardrail specific error messages when mutations are performed after breaching the limit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.6.0
    • 7.6.0
    • query
    • OS - Debian 10
      Couchbase server version - 7.6.0-1733
    • Untriaged
    • Linux x86_64
    • 0
    • Unknown

    Description

      Steps:

      1. Initialise a cluster with 2 nodes with provisioned profile, running just the KV service.
      2. Configure magmaMinimum=75 in http://172.23.216.46:8091/settings/resourceManagement
        Resident ratio guardrail would be breached if RR percentage drops below 75% for a Magma bucket.
      3. Create a Magma bucket with 512MB RAM per node with 1 replica. Create 2 scopes and 3 collections in each scope.
      4. Load data into the bucket until the Resident ratio value drops below 75%.
      5. Tried inserts via the SDK after the limit breach and received an error message which said 'BUCKET_RESIDENT_RATIO_TOO_LOW'.
      6. Added a Query node to the cluster to validate the same with a N1QL query.
      7. Performed this query

      INSERT INTO `default`.`_default`.`FunctionCollection1` ( KEY, VALUE )
        VALUES
        (
          "k0043",
          { "id": "01", "type": "airline"}
        )
      RETURNING META().id as docid, *; 

      1. Received the following error message

      [
        {
          "code": 12009,
          "msg": "DML Error, possible causes include concurrent modification. Failed to perform INSERT on key k0043 - cause: Error in INSERT of key: k0043",
          "reason": {
            "_level": "error",
            "caller": "couchbase:2563",
            "cause": {
              "cause": {
                "_level": "exception",
                "caller": "memcached:493",
                "cause": {
                  "attempts": 1,
                  "cause": "KV status 0x36"
                },
                "code": 5502,
                "key": "datastore.couchbase.bucket.action",
                "message": "Unable to complete action after 1 attempts"
              },
              "key": "k0043"
            },
            "code": 12036,
            "key": "datastore.couchbase.insert.error",
            "message": "Error in INSERT of key: k0043"
          }
        }
      

      1. The error message seen above doesn't specify why the insert failed. It was just a single document insert, and no doc ops were going on in parallel. I was expecting to see a guardrail specific error message via query as well, similar to the SDK error messages. It would be helpful for the customers as well, to better understand why mutations are blocked when tried through query.

      Attachments

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

        Activity

          People

            vibhav.sp Vibhav S P
            vibhav.sp Vibhav S P
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty