If the true requirement is merely to process the document once, then I
agree with Shawn's solution. You needn't concern yourself with knowing who
the leader is. If somehow it's important that it be guaranteed to execute
on the leader in particular, then take inspiration from some existing
URPs.
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
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
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 nod
Why do you only want to run it on the leader? This seems like a misunderstanding
of how NRT replication works.
wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/ (my blog)
> On May 8, 2021, at 6:26 AM, Ilan Ginzburg wrote:
>
> I'm not familiar with the way update pro
I'm not familiar with the way update processors work but an update is
processed by the leader after having been routed to it, right?
Would it be possible to run the leader specific code there/then while
taking advantage of knowing execution happens on the leader?
Ilan
Le ven. 7 mai 2021 à 21:20,
Hi Solr people,
I am writing a custom UpdateProcessor, part of a custom plugin, and need to run
some code only on the shard leader. This is a plugin, so I cannot access the
DistributedUpdateProcessor.isLeader() method which is not public.
For now I am copying-pasting the below code, but I am thi