Closed
Description
After setting up CCR I deleted one of the primary shards of the leader index and restart the single node cluster. That caused a stats exception which I guess caused the persistent task for that shard to fail to start.
[2018-09-24T22:54:43,423][INFO ][o.e.x.c.a.ShardFollowTasksExecutor] [Boaz-Mac.local] [follow_index_2][1] Started to track leader shard [lead_index][1]
[2018-09-24T22:54:43,444][WARN ][o.e.p.PersistentTasksNodeService] [Boaz-Mac.local] task f3k2vdkQTL-X_eRHvn_7VA-1 failed with an exception
java.lang.IllegalArgumentException: Cannot find shard stats for shard [follow_index_2][1]
at org.elasticsearch.xpack.ccr.action.ShardFollowTasksExecutor.lambda$fetchGlobalCheckpoint$4(ShardFollowTasksExecutor.java:187) [x-pack-ccr-7.0.0-alpha1-SNAPSHOT.jar:7.0.0-alpha1-SNAPSHOT]
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) [elasticsearch-7.0.0-alpha1-SNAPSHOT.jar:7.0.0-alpha1-SNAPSHOT]
I tried to pause following on one of the following indices:
POST follow_index/_ccr/unfollow
but this caused the following error. It should be possible to pause, even if not all tasks are started.
{
"error": {
"root_cause": [
{
"type": "resource_not_found_exception",
"reason": "the task with id Y2U0gXPBSaKJseUJEgqUCA-0 doesn't exist",
"suppressed": [
{
"type": "resource_not_found_exception",
"reason": "the task with id Y2U0gXPBSaKJseUJEgqUCA-1 doesn't exist"
}
]
}
],
"type": "resource_not_found_exception",
"reason": "the task with id Y2U0gXPBSaKJseUJEgqUCA-0 doesn't exist",
"suppressed": [
{
"type": "resource_not_found_exception",
"reason": "the task with id Y2U0gXPBSaKJseUJEgqUCA-1 doesn't exist"
}
]
},
"status": 404
}