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

版本: 6.8-8.9

简而言之,当Elasticsearch尝试对具有特定ID和分配ID的任务执行操作但找不到该任务时,会出现此错误。这可能是由于任务被删除,或者它从一开始就不存在。要解决此问题,您可以在对任务执行操作之前验证任务是否存在。如果任务应该存在,请检查可能导致其删除的任何问题。如果任务不应该存在,请更正操作以避免引用不存在的任务。

日志上下文 #

日志"the task with id {} and allocation id {} doesn’t exist"的类名称是 PersistentTasksClusterService.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人使用:

if (tasksInProgress.hasTask(taskId)) {
 logger.warn("trying to update state on task {} with unexpected allocation id {}"; taskId; taskAllocationId);
 } else {
 logger.warn("trying to update state on non-existing task {}"; taskId);
 }
 throw new ResourceNotFoundException("the task with id {} and allocation id {} doesn't exist"; taskId; taskAllocationId);
 }
 }  @Override
 public void onFailure(Exception e) {