Forget a follower Added in 6.7.0
Remove the cross-cluster replication follower retention leases from the leader.
A following index takes out retention leases on its leader index. These leases are used to increase the likelihood that the shards of the leader index retain the history of operations that the shards of the following index need to run replication. When a follower index is converted to a regular index by the unfollow API (either by directly calling the API or by index lifecycle management tasks), these leases are removed. However, removal of the leases can fail, for example when the remote cluster containing the leader index is unavailable. While the leases will eventually expire on their own, their extended existence can cause the leader index to hold more history than necessary and prevent index lifecycle management from performing some operations on the leader index. This API exists to enable manually removing the leases when the unfollow API is unable to do so.
NOTE: This API does not stop replication by a following index. If you use this API with a follower index that is still actively following, the following index will add back retention leases on the leader. The only purpose of this API is to handle the case of failure to remove the following retention leases after the unfollow API is invoked.
Path parameters
-
the name of the leader index for which specified follower retention leases should be removed
Body Required
-
follower_cluster string
-
follower_index string
-
follower_index_uuid string
-
leader_remote_cluster string
curl \
-X POST http://api.example.com/{index}/_ccr/forget_follower \
-H "Content-Type: application/json" \
-d '{"follower_cluster":"string","follower_index":"string","follower_index_uuid":"string","leader_remote_cluster":"string"}'
{
"follower_cluster": "string",
"follower_index": "string",
"follower_index_uuid": "string",
"leader_remote_cluster": "string"
}
{
"_shards": {
"failed": 42.0,
"successful": 42.0,
"total": 42.0,
"failures": [
{
"index": "string",
"node": "string",
"reason": {
"type": "string",
"reason": "string",
"stack_trace": "string",
"caused_by": {},
"root_cause": [
{}
],
"suppressed": [
{}
]
},
"shard": 42.0,
"status": "string"
}
],
"skipped": 42.0
}
}