📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 8-8.2

简而言之,当 Elasticsearch 尝试将分片分配到节点,但该分片已经被分配时,就会出现此错误。这种情况可能是由于配置错误或网络分区导致的。要解决此问题,您可以尝试以下方法:1) 检查集群健康状况,确保所有节点都已连接。2) 验证 Elasticsearch 配置中的分片分配设置。3) 如果问题仍然存在,您可能需要使用集群 reroute API 手动重新路由分片。在对集群进行任何更改之前,务必确保已备份数据。

日志上下文

日志 “[{}] allocation already exists” 的类名是 TrainedModelAllocationMetadata.java。我们从 Elasticsearch 源代码中提取了以下内容,以便那些需要深入了解上下文的人参考:

    return modelRoutingEntries.containsKey(modelId);
}  
 
public Builder addNewAllocation(String modelId; TrainedModelAllocation.Builder allocation) {
    if (modelRoutingEntries.containsKey(modelId)) {
        throw new ResourceAlreadyExistsException("[{}] allocation already exists"; modelId);
    }
    modelRoutingEntries.put(modelId; allocation);
    isChanged = true;
    return this;
}
查看 Markdown
On this page