Skip to content

Conversation

@martijnvg
Copy link
Member

Backports the following commits to 8.10:

…ask re-assignment. (elastic#98769)

The result of this issue is that a persistent gets stuck forever. The
following errors can occur in the es log:

```
[2023-08-22T17:35:08,733][WARN ][o.e.c.s.ClusterApplierService] [node_t0] failed to notify ClusterStateListener
  1> org.elasticsearch.index.IndexNotFoundException: no such index [avrcruawcg]
  1> 	at org.elasticsearch.cluster.routing.RoutingTable.shardRoutingTable(RoutingTable.java:142) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.xpack.downsample.DownsampleShardPersistentTaskExecutor.getAssignment(DownsampleShardPersistentTaskExecutor.java:113) ~[main/:?]
  1> 	at org.elasticsearch.xpack.downsample.DownsampleShardPersistentTaskExecutor.getAssignment(DownsampleShardPersistentTaskExecutor.java:51) ~[main/:?]
  1> 	at org.elasticsearch.persistent.PersistentTasksClusterService.createAssignment(PersistentTasksClusterService.java:351) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.persistent.PersistentTasksClusterService.shouldReassignPersistentTasks(PersistentTasksClusterService.java:438) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.persistent.PersistentTasksClusterService.clusterChanged(PersistentTasksClusterService.java:366) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateListener(ClusterApplierService.java:560) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateListeners(ClusterApplierService.java:546) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:505) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:429) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:154) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:916) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:217) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:183) ~[elasticsearch-8.10.0-SNAPSHOT.jar:8.10.0-SNAPSHOT]
  1> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
  1> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
```

This changes checks for this situation and allows these downsample tasks
to fail and cleanup. This is done by assigning it to a data node, so
that when the operation is executed on that node it fails and cleaned
up. (because the index couldn't be found).

Relates to elastic#98764

(marking as non issue, since this is bug in non released code)
@martijnvg martijnvg added :StorageEngine/Downsampling Downsampling (replacement for rollups) - Turn fine-grained time-based data into coarser-grained data >non-issue auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Aug 25, 2023
@elasticsearchmachine elasticsearchmachine merged commit 0c21ac1 into elastic:8.10 Aug 25, 2023
@martijnvg martijnvg deleted the backport/8.10/pr-98769 branch August 25, 2023 18:25
@JVerwolf JVerwolf added v8.10.0 and removed v8.10.1 labels Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >non-issue :StorageEngine/Downsampling Downsampling (replacement for rollups) - Turn fine-grained time-based data into coarser-grained data Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.10.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants