We are using CCR (elasticsearch v 6.8.x) for quite a time now to run in code where we automatically delete old indices.
The documentation states: The follower index must be paused and closed before invoking the unfollow API. (see: unfollow API documentation)
So, our worker kicks in and starts to invoke the pause API for a follower index, unsuccessfully.
method [POST], host [http://10.176.x.139:9200], URI [/ccr-visit.../_ccr/pause_follow], status line [HTTP/1.1 400 Bad Request]
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "no shard follow tasks for [ccr-visit...]"
}
],
"type": "illegal_argument_exception",
"reason": "no shard follow tasks for [ccr-visit...]"
},
"status": 400
}
No logs on elastic side though.
Maybe it's worth noting, that the leader index got created - therefore also the follower - but never got data written to.
Is there a way to prevent this message, or is this expected for empty follower indices?
Did you delete a follower index before pausing? If yes, you can safely ignore the error. We can improve the error handling for this situation. With https://github.com/elastic/elasticsearch/pull/44702, CCR should automatically unfollow if a follower index gets deleted. Ideally, we should pause, close, and unfollow before deleting a follower index.
Hey Nhat!
No I did not delete the index at all. It's still there.
So, I invoked _cat to show all indices and that this particular index is still there and then called the pause API which returns this error:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.