[英]_update_by_query + script do not work correctly,error:Trying to create too many scroll contexts
Elasticsearch version : 7.6.2 Elasticsearch 版本:7.6.2
JVM :13.0.2 JVM :13.0.2
OS version :centeros7操作系统版本:centeros7
This is my code这是我的代码
POST recommend_index/_update_by_query
{
"script": {
"source": "ctx._source.rec_doctor_id = 1"
},
"query": {
"bool": {
"must": [{
"terms": {
"id": ["22222"]
}
}]
}
}
}
This code does not return the result correctly,The error message is此代码没有正确返回结果,错误信息是
{
"error": {
"root_cause": [
{
"type": "exception",
"reason": "Trying to create too many scroll contexts. Must be less than or equal to: [5000]. This limit can be set by changing the [search.max_open_scroll_context] setting."
}
],
"type": "search_phase_execution_exception",
"reason": "Partial shards failure",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 1,
"index": "recommend_index",
"node": "XXX",
"reason": {
"type": "exception",
"reason": "Trying to create too many scroll contexts. Must be less than or equal to: [5000]. This limit can be set by changing the [search.max_open_scroll_context] setting."
}
}
]
},
"status": 500
}
I'm sure the current scroll is 0我确定当前滚动为 0
When I replace _UPDATE_BY_QUERY with _UPDATE, it updates normally当我用 _UPDATE 替换 _UPDATE_BY_QUERY 时,它会正常更新
No change has been made in ES since last Friday, and suddenly an error is reported ES从上周五就没有改过,突然报错
No configuration changes have been made to the ES server没有对 ES 服务器进行任何配置更改
follow-up: I set the search.max_open_scroll_context parameter to 5000 and found nothing to do with it.后续:我将search.max_open_scroll_context参数设置为5000,发现与它无关。 I looked up the 7.6.2 release and found that someone was having the same problem as me.Link on this here #71354 #56202 I guess this is due to scrolling triggering the 7.6.2 bug.I restarted the cluster node without upgrading and found that it worked!!
我查看了 7.6.2 版本,发现有人和我有同样的问题。链接在这里#71354 #56202我猜这是由于滚动触发了 7.6.2 错误。我重新启动了集群节点而没有升级和发现它有效!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.