On 5/8/2021 8:05 PM, lamine lamine wrote:
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.
What I am saying is that when you define the processor chain, include DistributedUpdateProcessor in it. It gets added by SolrCloud even if you don't include it, so it's better to have control over its placement. And then place your update processor in the list *BEFORE* DistributedUpdateProcessor.
This should accomplish your goals automatically, with no code required. Thanks, Shawn
