mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
Add API to execute SLM retention on-demand (#47405)
* Add API to execute SLM retention on-demand This commit adds the `/_slm/_execute_retention` API endpoint. This endpoint kicks off SLM retention and then returns immediately. This in particular allows us to run retention without scheduling it (for entirely manual invocation) or perform a one-off cleanup. This commit also includes HLRC for the new API, and fixes an issue in SLMSnapshotBlockingIntegTests where retention invoked prior to the test completing could resurrect an index the internal test cluster cleanup had already deleted. Resolves #46508 Relates to #43663
This commit is contained in:
parent
b1cc72786e
commit
17dc095606
14 changed files with 476 additions and 58 deletions
|
@ -0,0 +1,35 @@
|
|||
--
|
||||
:api: slm-execute-snapshot-lifecycle-retention
|
||||
:request: ExecuteSnapshotLifecycleRetentionRequest
|
||||
:response: AcknowledgedResponse
|
||||
--
|
||||
[role="xpack"]
|
||||
[id="{upid}-{api}"]
|
||||
=== Execute Snapshot Lifecycle Retention API
|
||||
|
||||
|
||||
[id="{upid}-{api}-request"]
|
||||
==== Request
|
||||
|
||||
The Execute Snapshot Lifecycle Retention API allows you to execute Snapshot Lifecycle Management
|
||||
Retention immediately, rather than waiting for its regularly scheduled execution.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request]
|
||||
--------------------------------------------------
|
||||
|
||||
[id="{upid}-{api}-response"]
|
||||
==== Response
|
||||
|
||||
The returned +{response}+ contains a boolean for whether the request was
|
||||
acknowledged by the master node.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-response]
|
||||
--------------------------------------------------
|
||||
|
||||
include::../execution.asciidoc[]
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue