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"}