Skip to content

Comments

Add update-policy! and auto-update on conflict for OpenSearch ISM#46

Merged
gbuisson merged 1 commit intomasterfrom
add-policy-update
Dec 11, 2025
Merged

Add update-policy! and auto-update on conflict for OpenSearch ISM#46
gbuisson merged 1 commit intomasterfrom
add-policy-update

Conversation

@gbuisson
Copy link
Contributor

  • Add get-policy-raw function to retrieve full API response including _seq_no and _primary_term metadata needed for OpenSearch ISM updates
  • Add update-policy! function that handles optimistic locking for OpenSearch ISM (requires seq_no and primary_term query params)
  • Modify create-policy! to catch 409 Conflict errors and automatically retry with update-policy!, making policy creation idempotent
  • Add integration tests for policy update functionality

OpenSearch ISM requires version control parameters for updates, unlike Elasticsearch ILM which allows simple PUT overwrites. This change makes the API consistent across both engines.

- Add get-policy-raw function to retrieve full API response including
  _seq_no and _primary_term metadata needed for OpenSearch ISM updates
- Add update-policy! function that handles optimistic locking for
  OpenSearch ISM (requires seq_no and primary_term query params)
- Modify create-policy! to catch 409 Conflict errors and automatically
  retry with update-policy!, making policy creation idempotent
- Add integration tests for policy update functionality

OpenSearch ISM requires version control parameters for updates, unlike
Elasticsearch ILM which allows simple PUT overwrites. This change makes
the API consistent across both engines.
@gbuisson gbuisson merged commit fe244f2 into master Dec 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants