Table of Contents |
---|
Steps:
Create a namespace with Bugfest dataset
...
If decided to do this on a topic level only - log.retention.ms should be changed because it has higher precedence over ..minutes and it's usually already set to some value.
Tune mod-search config(REQUIRED)
KAFKA_EVENTS_CONCURRENCY (default - 2) with higher value could increase instances reindex.
...
After completion of all pre-required steps, trigger index with POST Postman request.
URI: /search/index/inventory/reindex
Headers: X-Okapi-Tenant & X-Okapi-Token
items for resourceName: instance, authority, location
Body:
Code Block | ||
---|---|---|
| ||
{ "recreateIndex": true, "resourceName": "instance", "indexSettings": { "numberOfShards": 1, "numberOfReplicas": 1 } } |
Info | ||
---|---|---|
| ||
More information about index and requests you could find here: |
...
Code Block | ||
---|---|---|
| ||
// Request PUT /folio-testing-sprint_instance_fs09000000/_settings { "index": { "number_of_replicas": "1", "refresh_interval": "1s" } } // Response { acknowledged: true } |
Scale-down backend modules(REQUIRED)
After the indexation process is finished, do not forget to scale down the backend modules in Rancher
...
- mod-search (4 → 1) (or 4 → 2 for namespaces with HA mode)
- mod-inventory-storage (2 → 1) (or not scale down for namespaces with HA mode)
...
After the indexation process is finished, do not forget to scale down the shared OpenSearch AWS service
r6g.2xlarge → r6g.xlarge (If no other conditions/constraints)
Adjust Kafka messages retention back(OPTIONAL, if previously modified)
Return previous value to log.retention property (usually 8 hours).
Tune mod-search config back(REQUIRED)
Return modified env variables to default values
An additional approach in case if reindex doesn't work properly (failing, stuck, etc...)
1. Recreate Kafka topics from KafkaUI
2. Remove existing indexes from OpenSearch
3. Send PUT and POST requests from OpenSearch to clone indexes, do it for all the necessary tenants,
select all the rows and send a request
In this example for tenant fs09000000
PUT /general_instance_subject_fs09000000/_block/write
PUT /general_instance_fs09000000/_block/write
PUT /general_contributor_fs09000000/_block/write
PUT /general_authority_fs09000000/_block/write
POST /general_instance_fs09000000/_clone/folio-testing-sprint_instance_fs09000000
POST /general_instance_subject_fs09000000/_clone/folio-testing-sprint_instance_subject_fs09000000
POST /general_contributor_fs09000000/_clone/folio-testing-sprint_contributor_fs09000000
POST /general_authority_fs09000000/_clone/folio-testing-sprint_authority_fs09000000