Skip to content

[CCR] Stats show follower index even after it has been deleted #37018

@sebelga

Description

@sebelga

After deleting index (that was a follower), the _ccr/stats API still show the index in the stats.

Expected behavior: When an index does not exist anymore, it should not be listed as a follower index in the ccr stats.

Steps to reproduces

  1. Create a follower index
PUT /my-follower-index/_ccr/follow
{
  "remote_cluster" : "new-york",
  "leader_index" : "kibana_sample"
}
  1. Delete the index
DELETE /my-follower-index
  1. Fetch the CCR stats
GET /_ccr/stats

Response (200 status)
{
    "auto_follow_stats": {
        "number_of_failed_follow_indices": 0,
        ...
    },
    "follow_stats": {
        "indices": [
            {
                "index": "my-follower-index",
                "shards": [
                    {
                        "remote_cluster": "new-york",
                        "leader_index": "kibana_sample",
                        "follower_index": "my-follower-index",
                        ...
                    }
                ]
            }
        ]
    }
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions