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

Free-Tier limits: Setting single scope limits-num_fts_indexes applying for all the scopes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not a Bug
    • Neo
    • Neo
    • fts
    • None
    • Untriaged
    • 1
    • Unknown

    Description

      Build: 7.1.0-1787

      • 2 node cluster with kv and fts
      • Enforce limits

        curl -s -u Administrator:password  http://172.23.97.211:8091/internalSettings -d "enforceLimits=true"
        

      • Load travel-sample
      • Set num_fts_indexes to 1 for scope inventory

        curl -u Administrator:password http://172.23.97.211:8091/pools/default/buckets/travel-sample/scopes -d 'name=inventory&limits={"fts": {"num_fts_indexes":1}}'
        

      • Get current limits set. We do see num_fts_indexes set to 1 for inventory scope and not for tenant_agent_00

        curl -s -u Administrator:password http://172.23.97.211:8091/pools/default/buckets/travel-sample/scopes | jq
        {
          "uid": "5",
          "scopes": [
            {
              "name": "scope1",
              "uid": "e",
              "collections": [],
              "limits": {
                "fts": {
                  "num_fts_indexes": 1
                }
              }
            },
            {
              "name": "inventory",
              "uid": "d",
              "collections": [
                {
                  "name": "airport",
                  "uid": "16",
                  "maxTTL": 0
                },
                {
                  "name": "airline",
                  "uid": "15",
                  "maxTTL": 0
                },
                {
                  "name": "route",
                  "uid": "14",
                  "maxTTL": 0
                },
                {
                  "name": "landmark",
                  "uid": "13",
                  "maxTTL": 0
                },
                {
                  "name": "hotel",
                  "uid": "12",
                  "maxTTL": 0
                }
              ],
              "limits": {
                "fts": {
                  "num_fts_indexes": 1
                }
              }
            },
            {
              "name": "tenant_agent_00",
              "uid": "c",
              "collections": [
                {
                  "name": "users",
                  "uid": "11",
                  "maxTTL": 0
                },
                {
                  "name": "bookings",
                  "uid": "10",
                  "maxTTL": 0
                }
              ]
            },
            {
              "name": "tenant_agent_01",
              "uid": "b",
              "collections": [
                {
                  "name": "users",
                  "uid": "f",
                  "maxTTL": 0
                },
                {
                  "name": "bookings",
                  "uid": "e",
                  "maxTTL": 0
                }
              ]
            },
            {
              "name": "tenant_agent_02",
              "uid": "a",
              "collections": [
                {
                  "name": "bookings",
                  "uid": "d",
                  "maxTTL": 0
                },
                {
                  "name": "users",
                  "uid": "c",
                  "maxTTL": 0
                }
              ]
            },
            {
              "name": "tenant_agent_03",
              "uid": "9",
              "collections": [
                {
                  "name": "users",
                  "uid": "b",
                  "maxTTL": 0
                },
                {
                  "name": "bookings",
                  "uid": "a",
                  "maxTTL": 0
                }
              ]
            },
            {
              "name": "tenant_agent_04",
              "uid": "8",
              "collections": [
                {
                  "name": "bookings",
                  "uid": "9",
                  "maxTTL": 0
                },
                {
                  "name": "users",
                  "uid": "8",
                  "maxTTL": 0
                }
              ]
            },
            {
              "name": "_default",
              "uid": "0",
              "collections": [
                {
                  "name": "_default",
                  "uid": "0",
                  "maxTTL": 0
                }
              ]
            }
          ]
        }
        

      • Now try creating a 2 partition index on tenant_agent_00 which fails with below:

        curl -XPUT -H "Content-Type: application/json" -u Administrator:password http://172.23.97.212:8094/api/index/agent_index3 -d '{
          "type": "fulltext-index",
          "sourceType": "gocbcore",
          "sourceName": "travel-sample",
          "sourceUUID": "6c5e1959b8e74d6eba8dca047d4c36df",
          "planParams": {
            "maxPartitionsPerPIndex": 1024,
            "indexPartitions": 2
          },
          "params": {
            "doc_config": {
              "docid_prefix_delim": "",
              "docid_regexp": "",
              "mode": "scope.collection.type_field",
              "type_field": "type"
            },
            "mapping": {
              "analysis": {},
              "default_analyzer": "standard",
              "default_datetime_parser": "dateTimeOptional",
              "default_field": "_all",
              "default_mapping": {
                "dynamic": true,
                "enabled": false
              },
              "default_type": "_default",
              "docvalues_dynamic": false,
              "index_dynamic": true,
              "store_dynamic": false,
              "type_field": "_type",
              "types": {
                "tenant_agent_00.users": {
                  "dynamic": true,
                  "enabled": true
                }
              }
            },
            "store": {
              "indexType": "scorch",
              "segmentVersion": 15
            }
          },
          "sourceParams": {}
        }'
        {"error":"rest_create_index: error creating index: agent_index3, err: manager_api: CreateIndex, Prepare failed, err: partition limit exceeded (2 \u003e 1)","request":{"params":{"doc_config":{"docid_prefix_delim":"","docid_regexp":"","mode":"scope.collection.type_field","type_field":"type"},"mapping":{"analysis":{},"default_analyzer":"standard","default_datetime_parser":"dateTimeOptional","default_field":"_all","default_mapping":{"dynamic":true,"enabled":false},"default_type":"_default","docvalues_dynamic":false,"index_dynamic":true,"store_dynamic":false,"type_field":"_type","types":{"tenant_agent_00.users":{"dynamic":true,"enabled":true}}},"store":{"indexType":"scorch","segmentVersion":15}},"planParams":{"indexPartitions":2,"maxPartitionsPerPIndex":1024},"sourceName":"travel-sample","sourceParams":{},"sourceType":"gocbcore","sourceUUID":"6c5e1959b8e74d6eba8dca047d4c36df","type":"fulltext-index"},"status":"fail"}
        
        

      Attachments

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

        Activity

          Girish Benakappa , your findings aren't precise.

          There is no issue with respect to setting the limits per scope. Limit per scope is working as expected. You should be able to create single partitioned indexes against the "tenant_agent_00" scope.

          The error you get is for the partition limit if you notice.

           {"error":"rest_create_index: error creating index: agent_index3, err: manager_api: CreateIndex, Prepare failed, err: partition limit exceeded (2 \u003e 1)

          Closing this as not reproducible.

           

          Sreekanth Sivasankaran Sreekanth Sivasankaran added a comment - Girish Benakappa , your findings aren't precise. There is no issue with respect to setting the limits per scope. Limit per scope is working as expected. You should be able to create single partitioned indexes against the "tenant_agent_00" scope. The error you get is for the partition limit if you notice. { "error" :"rest_create_index: error creating index: agent_index3, err: manager_api: CreateIndex, Prepare failed, err: partition limit exceeded ( 2 \u003e 1 ) Closing this as not reproducible.  

          People

            girish.benakappa Girish Benakappa
            girish.benakappa Girish Benakappa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty