You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 withpreference=_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 setpreference
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.The text was updated successfully, but these errors were encountered: