ElasticSearch中的长期运行任务失败



我有大约1.8亿个文档的索引(我有34个文档需要清除(,我目前正在ElasticSearch中使用/rendex和_ingest/pipeline进行转换。

问题是,它80%的跑步都失败了。出现此错误:

"error" : {
"type" : "search_phase_execution_exception",
"reason" : "all shards failed",
"phase" : "query",
"grouped" : true,
"failed_shards" : [
{
"shard" : -1,
"index" : null,
"reason" : {
"type" : "illegal_state_exception",
"reason" : "node [d6UWyUAKSwq53szZy2VlNQ] is not available"
}
}
]

它通常发生在1.2亿至1.4亿份文档中。看看格拉法纳,一切似乎都很好。CPU负载不错,内存足够。我不知道该怎么做才能节省时间,而不是一次又一次地启动这个程序。

运行示例:

POST /_reindex?wait_for_completion=false&slices=auto
{
"source": {
"index": "index_tmp"
},
"dest": {
"index": "index_resulting",
"pipeline": "remove_unused_fields"
}
}

您应该尝试切片=1,这将花费更长的时间,但它也会减少集群的负载

POST /_reindex?wait_for_completion=false&slices=1
{
"source": {
"index": "index_tmp"
},
"dest": {
"index": "index_resulting",
"pipeline": "remove_unused_fields"
}
}

最新更新