Operations¶
OpenSearch down¶
Pages are not affected: documents only go to the queue.
The queue grows;
moodle_tool_opensearch_upgoes to 0 andqueue_oldest_age_secondsrises.When the cluster is back,
ship_queueempties the queue, up tobatchdocsdocuments per request, for 50 seconds per minute. Documents that failed wait with exponential backoff (30 s, 1 min, 2 min… up to 30 min, with jitter).Above
queuemaxdocuments, new ones are discarded and counted indocuments_dropped_total. The limit uses the size counted by the last run of the task, so it is approximate.
Capacity¶
Throughput of one run: about
batchdocsdocuments per request, as many requests as fit in 50 seconds. With the defaults and a cluster answering a 5000 document_bulkin 2 seconds, about 100000 documents per minute.Queue in the database: each document is one row with its JSON; rows are deleted once sent.
Storage in OpenSearch: measure the average document size of each stream;
best_compressionusually cuts it by half or more.
Retention¶
Each stream has an ISM policy
<prefix>-<stream>-ism: the backing index rolls over after 7 days or 30 GB per primary shard, and is deleted when it is older than the retention.Changing the retention updates the policy and moves the existing backing indices to the new version.
Troubleshooting¶
401 or 403 in the connection test: credentials or role.
TLS error: the CA bundle, or the client certificate and key.
Documents rejected (
failed): the document has a field not in the mapping of the stream; the last error on the connection test page names it. Fix the producer.Templates not sent: run
php admin/tool/opensearch/cli/sync.php --forceand read the error of each stream.