Briefly, this error occurs when an Elasticsearch datafeed is being stopped but gets reassigned to another node during the process. This could be due to node failures or network issues. To resolve this, you can try to ensure the stability of your Elasticsearch cluster by monitoring the health of your nodes and network. Also, consider setting up dedicated master nodes to manage cluster tasks and prevent reassignments during critical operations. Lastly, check your cluster settings and adjust the ‘cluster.routing.allocation’ settings to control shard allocation and reassignment.
This guide will help you check for common problems that cause the log ” [{}] datafeed got reassigned while stopping. Marking as completed ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.
Log Context
Log “[{}] datafeed got reassigned while stopping. Marking as completed” classname is TransportStartDatafeedAction.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
// races in the way messages pass between nodes via cluster state or direct action calls // we need to detect stopped/stopping by both considering the persistent task state in // cluster state and also whether an explicit request to stop has been received on this // node. if (DatafeedState.STOPPING.equals(datafeedState)) { logger.info("[{}] datafeed got reassigned while stopping. Marking as completed"; params.getDatafeedId()); datafeedTask.completeOrFailIfRequired(null); return; } switch (datafeedTask.setDatafeedRunner(datafeedRunner)) { case NEITHER -> datafeedRunner.run(datafeedTask; datafeedTask::completeOrFailIfRequired);
[ratemypost]