Skip to content

Unnecessary index template settings updates cause redundant PUT requests and startup overhead #37240

@houssain-barouni

Description

@houssain-barouni

Description

During schema initialization the system always issues PUT requests to update index template settings for both Elasticsearch and OpenSearch, even when no actual change (priority, shard/replica settings) is required. This leads to redundant cluster state updates, noisy logs, and avoidable startup latency.

Steps to reproduce

  1. Start Camunda with search schema creation enabled.
  2. Observe logs: template creation/updates logged.
  3. Enable ES or OS debug logs.
  4. Restart without changing any index related configuration.
  5. Observe repeated template update attempts despite no changes.

Current behavior

On each startup, the SchemaManager triggers template update logic which unconditionally sends template PUT requests.

Expected behavior

Template settings (priority, number_of_shards, number_of_replicas, other static settings) are compared with the desired configuration. Only when differences exist should an update (PUT) be sent. Otherwise no-op with a debug log.

Environment

SaaS & SM

Version

  • Component Version: 8.8

Rootcause

Missing pre‑update comparison of template priority and resolved settings block loaded from descriptor vs current template state retrieved from the cluster.

Solution ideas

  • Skip updating index templates settings when no updates are detected
  • Run settings updates concurrently using virtual threads in SchemaManager to reduce total time.

Dev -> QA handover

  • Resources:
  • Versions to validate:
  • Release version (in which version this feature will be released):

Links

No response

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions