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

Intermittent : Query does not sync up with the collection manifest quickly enough

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      Build : 7.0.0-3435

      This is an intermittent issue, seen earlier as well.

      In some tests, a collection is created using CLI. Then after 5 seconds wait, an insert operation is performed via query on this collection. Sometimes, query doesnt recognize this collection, meaning it has not synced up with the collection manifest.

      Here is the test console log :

      2020-10-19 16:10:00 | INFO | MainProcess | test_thread | [remote_util.execute_couchbase_cli] command to run: /opt/couchbase/bin/couchbase-cli collection-manage -c http://172.23.123.146:8091 -u Administrator -p password  --bucket bucket1 --create-collection _default.collection1
      2020-10-19 16:10:00 | INFO | MainProcess | test_thread | [collections_cli_client.create_collection] Collection created bucket1->_default->collection1
      2020-10-19 16:10:00 | INFO | MainProcess | test_thread | [basetestcase.sleep] sleep for 5 secs.  ...
      2020-10-19 16:10:05 | INFO | MainProcess | test_thread | [tuq.run_cbq_query] RUN QUERY insert into default:bucket1._default.collection1 (KEY, VALUE) VALUES ('default:bucket1._default.collection1_id', {'val':1, 'name' : 'default:bucket1._default.collection1_name' })
      2020-10-19 16:10:05 | INFO | MainProcess | test_thread | [rest_client.query_tool] query params : statement=insert+into+default%3Abucket1._default.collection1+%28KEY%2C+VALUE%29+VALUES+%28%27default%3Abucket1._default.collection1_id%27%2C+%7B%27val%27%3A1%2C+%27name%27+%3A+%27default%3Abucket1._default.collection1_name%27+%7D%29&scan_consistency=REQUEST_PLUS
      2020-10-19 16:10:05 | ERROR | MainProcess | test_thread | [rest_client._http_request] POST http://172.23.123.146:8093/query?statement=insert+into+default%3Abucket1._default.collection1+%28KEY%2C+VALUE%29+VALUES+%28%27default%3Abucket1._default.collection1_id%27%2C+%7B%27val%27%3A1%2C+%27name%27+%3A+%27default%3Abucket1._default.collection1_name%27+%7D%29&scan_consistency=REQUEST_PLUS body:  headers: {'Authorization': 'Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA=='} error: 500 reason: unknown b'{\n"requestID": "7a4cc0f1-ba67-49b1-afdc-dc0e07a00339",\n"errors": [{"code":12003,"msg":"Keyspace not found in CB datastore: default:bucket1._default.collection1"}],\n"status": "fatal",\n"metrics": {"elapsedTime": "22.398777ms","executionTime": "22.29657ms","resultCount": 0,"resultSize": 0,"serviceLoad": 1,"errorCount": 1}\n}\n' auth: Administrator:password
      2020-10-19 16:10:05 | INFO | MainProcess | test_thread | [n1ql_collections_end2end._perform_end_to_end_test] CBQError: host 172.23.123.146: ERROR:{'requestID': '7a4cc0f1-ba67-49b1-afdc-dc0e07a00339', 'errors': [{'code': 12003, 'msg': 'Keyspace not found in CB datastore: default:bucket1._default.collection1'}], 'status': 'fatal', 'metrics': {'elapsedTime': '22.398777ms', 'executionTime': '22.29657ms', 'resultCount': 0, 'resultSize': 0, 'serviceLoad': 1, 'errorCount': 1}}
      

      Sometimes, we see this as well-

      2020-10-16 01:28:34 | INFO | MainProcess | test_thread | [remote_util.execute_couchbase_cli] command to run: /opt/couchbase/bin/couchbase-cli collection-manage -c http://172.23.123.100:8091 -u Administrator -p password  --bucket bucket1 --create-collection _default.collection1
      2020-10-16 01:28:34 | INFO | MainProcess | test_thread | [collections_cli_client.create_collection] Collection created bucket1->_default->collection1
      2020-10-16 01:28:34 | INFO | MainProcess | test_thread | [basetestcase.sleep] sleep for 5 secs.  ...
      2020-10-16 01:28:39 | INFO | MainProcess | test_thread | [tuq.run_cbq_query] RUN QUERY insert into default:bucket1._default.collection1 (KEY, VALUE) VALUES ('default:bucket1._default.collection1_id', {'val':1, 'name' : 'default:bucket1._default.collection1_name' })
      2020-10-16 01:28:39 | INFO | MainProcess | test_thread | [rest_client.query_tool] query params : statement=insert+into+default%3Abucket1._default.collection1+%28KEY%2C+VALUE%29+VALUES+%28%27default%3Abucket1._default.collection1_id%27%2C+%7B%27val%27%3A1%2C+%27name%27+%3A+%27default%3Abucket1._default.collection1_name%27+%7D%29&scan_consistency=REQUEST_PLUS
      2020-10-16 01:28:40 | INFO | MainProcess | test_thread | [n1ql_collections_end2end._perform_end_to_end_test] CBQError: host 172.23.123.100: ERROR:{'requestID': 'e12b63ee-9355-475f-8d98-314f1d2ac5fa', 'signature': None, 'results': [], 'errors': [{'code': 12009, 'msg': 'DML Error, possible causes include CAS mismatch or concurrent modificationFailed to perform INSERT - cause: Key default:bucket1._default.collection1_id - cause: MCResponse status=UNKNOWN_COLLECTION, opcode=ADD, opaque=0, msg: {"error":{"context":"Unknown scope or collection in operation"},"manifest_uid":"0"}'}], 'status': 'errors', 'metrics': {'elapsedTime': '46.280473ms', 'executionTime': '46.204715ms', 'resultCount': 0, 'resultSize': 0, 'serviceLoad': 1, 'errorCount': 1}}
      

      Attachments

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

        Activity

          People

            mihir.kamdar Mihir Kamdar (Inactive)
            mihir.kamdar Mihir Kamdar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty