I only want the code be run once per shard. One way to guarantee that is to do it in the leader, as there is always one leader per shard. I don't want to run it in all the replicas. The code to run is "external" it doesn't touch any document.
Le samedi 8 mai 2021 à 17:21:50 UTC−5, Shawn Heisey <apa...@elyograg.org> a écrit : On 5/8/2021 12:21 PM, Walter Underwood wrote: > Why do you only want to run it on the leader? This seems like a > misunderstanding > of how NRT replication works. As I understand NRT, any update processor that is configured *before* DistributedUpdateProcessor in the chain will be run once by the node that first handles the update (probably the leader), and any processor that is configured *after* DistributedUpdateProcessor will be run by every indexing replica. Can anyone confirm or deny my understanding? Thanks, Shawn