mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 21:48:39 +00:00
This commit introduces the forget follower API. This API is needed in cases that unfollowing a following index fails to remove the shard history retention leases on the leader index. This can happen explicitly through user action, or implicitly through an index managed by ILM. When this occurs, history will be retained longer than necessary. While the retention lease will eventually expire, it can be expensive to allow history to persist for that long, and also prevent ILM from performing actions like shrink on the leader index. As such, we introduce an API to allow for manual removal of the shard history retention leases in this case.
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
--
|
|
:api: ccr-forget-follower
|
|
:request: ForgetFollowerRequest
|
|
:response: BroadcastResponse
|
|
--
|
|
|
|
[id="{upid}-{api}"]
|
|
=== Forget Follower API
|
|
|
|
[id="{upid}-{api}-request"]
|
|
==== Request
|
|
|
|
The Forget Follower API allows you to manually remove the follower retention
|
|
leases from the leader. Note that these retention leases are automatically
|
|
managed by the following index. This API exists only for cases when invoking
|
|
the unfollow API on the follower index is unable to remove the follower
|
|
retention leases.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
|
--------------------------------------------------
|
|
<1> The name of the cluster containing the follower index.
|
|
<2> The name of the follower index.
|
|
<3> The UUID of the follower index (can be obtained from index stats).
|
|
<4> The alias of the remote cluster containing the leader index.
|
|
<5> The name of the leader index.
|
|
|
|
[id="{upid}-{api}-response"]
|
|
==== Response
|
|
|
|
The returned +{response}+ indicates if the response was successful.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
|
--------------------------------------------------
|
|
<1> The high-level shards summary.
|
|
<2> The total number of shards the request was executed on.
|
|
<3> The total number of shards the request was successful on.
|
|
<4> The total number of shards the request was skipped on (should always be zero).
|
|
<5> The total number of shards the request failed on.
|
|
<6> The shard-level failures.
|
|
|
|
include::../execution.asciidoc[]
|