Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rivers might not get started due to missing _meta document #4864

Closed
javanna opened this issue Jan 23, 2014 · 0 comments
Closed

Rivers might not get started due to missing _meta document #4864

javanna opened this issue Jan 23, 2014 · 0 comments

Comments

@javanna
Copy link
Member

javanna commented Jan 23, 2014

When a new river is registered by indexing its _meta document, its type gets created via dynamic mappings, which triggers a cluster state update task on the master node. The update triggers a cluster state listener (RiversRouter) that executes only on the master. The master node looks for the river _meta document (get with preference=_primary) and schedules a retry in case it is not found (since #4089).

Once the master node has found the _meta document it decides where to allocate the river and publishes the new river cluster state containing that information. At that point each node receives the new river cluster state and the node where the river is supposed to be allocated on will start the river locally (RiversService.ApplyRivers).

In order for the river to be properly allocated, the _meta document has to be found through get api. There is a retry mechanism in case the get fails, but not in case the _meta document is not found, which can currently happen as this second get doesn't set preference to _primary, thus the _meta document could be found by the master node on the primary shard, but not on the second get call done by the node that is trying to start the river locally. This happens when the document replication hasn't been completed yet.

Long story short: no retry needed, we just need to add preference=_primary to the second get call.

@ghost ghost assigned javanna Jan 23, 2014
javanna added a commit to javanna/elasticsearch that referenced this issue Jan 23, 2014
javanna added a commit to javanna/elasticsearch that referenced this issue Jan 23, 2014
javanna added a commit to javanna/elasticsearch that referenced this issue Jan 23, 2014
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant