Solr query fetching different results

2019-09-18 Thread Jayadevan Maymala
Hi all,

There is something "strange' happening in our Solr cluster. If I execute a
query from the server, via solarium client, I get one result. If I execute
the same or similar query from admin Panel, I get another result. If I go
to Admin Panel  - Collections - Select Collection and click "Reload", and
then repeat the query, the result I get is consistent with  the one I get
from the server via solarium client. So I picked the query that is getting
executed, from Solr logs. Evidently, the query was going to different nodes.

Query that went from Admin Panel, went to node 4 and fetched 0 documents
2019-09-19 05:02:04.549 INFO  (qtp434091818-205178)
[c:paymetryproducts s:shard1 r:*core_node4*
x:paymetryproducts_shard1_replica_n2] o.a.s.c.S.Request
[paymetryproducts_shard1_replica_n2]  webapp=/solr path=/select
params={q=category_id:5a0aeaeea6bc7239cc21ee39&_=1568868718031} *hits=0*
status=0 QTime=0


Query that went from solarium client running on a server, went to node 3
and fetched 4 documents

2019-09-19 05:06:41.511 INFO  (qtp434091818-17)
[c:paymetryproducts s:shard1 r:*core_node3*
x:paymetryproducts_shard1_replica_n1] o.a.s.c.S.Request
[paymetryproducts_shard1_replica_n1]  webapp=/solr path=/select
params={q=category_id:5a0aeaeea6bc7239cc21ee39=flat=true=ID=0=90=json}
*hits=4* status=0 QTime=104

What could be causing this strange behaviour? How can I fix this?
SOlr Version - 7.3
Shard count: 1
replicationFactor: 2
maxShardsPerNode: 1

Regards,
Jayadevan


Re: Custom update processor not kicking in

2019-09-18 Thread Rahul Goswami
Eric, Markus,
Thank you for your inputs. I made sure that the jar file is found correctly
since the core reloads fine and also prints the log lines from my processor
during update request (getInstane() method of the update factory). The
reason why I want to insert the processor between distributed update
processor (DUP) and run update processor (RUP) is because there are certain
fields which were indexed against a dynamic field “*” and later the schema
was patched to remove the * field, causing atomic updates to fail for such
documents. Reindexing is not option since the index has nearly 200 million
docs. My understanding is that the atomic updates are stitched back to a
complete document in the DUP before being reindexed by RUP. Hence if I am
able to access the document before being indexed and check for fields which
are not defined in the schema, I can remove them from the stitched back
document so that the atomic update can happen successfully for such docs.
The documentation below mentions that even if I don’t include the DUP in my
chain it is automatically inserted just before RUP.

https://lucene.apache.org/solr/guide/7_2/update-request-processors.html#custom-update-request-processor-chain


I tried both approaches viz. explicitly specifying my processor after DUP
in the chain and also tried using the “post-processor” option in the chain,
to have the custom processor execute after DUP. Still looks like the
processor is just short circuited. I have defined my logic in the
processAdd() of the  processor. Is this an expected behavior?

Regards,
Rahul


On Wed, Sep 18, 2019 at 5:28 PM Erick Erickson 
wrote:

> It Depends (tm). This is a little confused. Why do you have
> distributed processor in stand-alone Solr? Stand-alone doesn't, well,
> distribute updates so that seems odd. Do try switching it around and
> putting it on top, this should be OK since distributed is irrelevant.
>
> You can also just set a breakpoint and see for instance, the
> instructions in the "IntelliJ" section here:
> https://cwiki.apache.org/confluence/display/solr/HowToContribute
>
> One thing I'd do is make very, very sure that my jar file was being
> found. IIRC, the -v startup option will log exactly where solr looks
> for jar files. Be sure your custom jar is in one of them and is picked
> up. I've set a lib directive to one place only to discover that
> there's an old copy lying around someplace else
>
> Best,
> Erick
>
> On Wed, Sep 18, 2019 at 5:08 PM Markus Jelsma
>  wrote:
> >
> > Hello Rahul,
> >
> > I don't know why you don't see your logs lines, but if i remember
> correctly, you must put all custom processors above Log, Distributed and
> Run, at least i remember i read it somewhere a long time ago.
> >
> > We put all our custom processors on top of the three default processors
> and they run just fine.
> >
> > Try it.
> >
> > Regards,
> > Markus
> >
> > -Original message-
> > > From:Rahul Goswami 
> > > Sent: Wednesday 18th September 2019 22:20
> > > To: solr-user@lucene.apache.org
> > > Subject: Custom update processor not kicking in
> > >
> > > Hello,
> > >
> > > I am using solr 7.2.1 in a standalone mode. I created a custom update
> > > request processor and placed it between the distributed processor and
> run
> > > update processor in my chain. I made sure the chain is invoked since I
> see
> > > log lines from the getInstance() method of my processor factory. But I
> > > don’t see any log lines from the processAdd() method.
> > >
> > > Any inputs on why the processor is getting skipped if placed after
> > > distributed processor?
> > >
> > > Thanks,
> > > Rahul
> > >
>


Re: DIH: Create Child Documents in ScriptTransformer

2019-09-18 Thread Erick Erickson
When it starts getting complex, I usually move to SolrJ. You say
you're loading documents, so I assume Tika is in the mix too.

Here's a blog on the topic so you an see how to get started...

https://lucidworks.com/post/indexing-with-solrj/

Best,
Erick

On Wed, Sep 18, 2019 at 2:56 PM Jörn Franke  wrote:
>
> Hi,
>
> I load a set of documents. Based on these documents some logic needs to be
> applied to split them into chapters (this is done). One whole document is
> loaded as a parent. Chapters of the whole document + metadata should be
> loaded as child documents of this parent.
> I want to now collect information on how this can be done:
> * Use a custom loader - this is possible and works
> * Use DIH and extract the chapters in a ScriptTransformer and add them as
> child documents there. However, the scripttransformer receives as input
> only a HashMap and while it works to transform field values etc. It does
> not seem possible to add childdocuments within the DIH scripttransformer. I
> tried adding a JavaArray with SolrInputDocuments, but this does not seem to
> work. I see in debug/verbose mode that indeed the transformer adds them to
> the HashMap correctly, but they don't end up in the document. Maybe here it
> could be possible somehow via nested entities?
> * Use DIH+ an UpdateProcessor (Script): there i get the SolrInputDocument
> as a parameter and it seems feasible to extract chapters and add them as
> child documents.
>
> thank you.
>
> best regards


Re: Custom update processor not kicking in

2019-09-18 Thread Erick Erickson
It Depends (tm). This is a little confused. Why do you have
distributed processor in stand-alone Solr? Stand-alone doesn't, well,
distribute updates so that seems odd. Do try switching it around and
putting it on top, this should be OK since distributed is irrelevant.

You can also just set a breakpoint and see for instance, the
instructions in the "IntelliJ" section here:
https://cwiki.apache.org/confluence/display/solr/HowToContribute

One thing I'd do is make very, very sure that my jar file was being
found. IIRC, the -v startup option will log exactly where solr looks
for jar files. Be sure your custom jar is in one of them and is picked
up. I've set a lib directive to one place only to discover that
there's an old copy lying around someplace else

Best,
Erick

On Wed, Sep 18, 2019 at 5:08 PM Markus Jelsma
 wrote:
>
> Hello Rahul,
>
> I don't know why you don't see your logs lines, but if i remember correctly, 
> you must put all custom processors above Log, Distributed and Run, at least i 
> remember i read it somewhere a long time ago.
>
> We put all our custom processors on top of the three default processors and 
> they run just fine.
>
> Try it.
>
> Regards,
> Markus
>
> -Original message-
> > From:Rahul Goswami 
> > Sent: Wednesday 18th September 2019 22:20
> > To: solr-user@lucene.apache.org
> > Subject: Custom update processor not kicking in
> >
> > Hello,
> >
> > I am using solr 7.2.1 in a standalone mode. I created a custom update
> > request processor and placed it between the distributed processor and run
> > update processor in my chain. I made sure the chain is invoked since I see
> > log lines from the getInstance() method of my processor factory. But I
> > don’t see any log lines from the processAdd() method.
> >
> > Any inputs on why the processor is getting skipped if placed after
> > distributed processor?
> >
> > Thanks,
> > Rahul
> >


RE: Custom update processor not kicking in

2019-09-18 Thread Markus Jelsma
Hello Rahul,

I don't know why you don't see your logs lines, but if i remember correctly, 
you must put all custom processors above Log, Distributed and Run, at least i 
remember i read it somewhere a long time ago.

We put all our custom processors on top of the three default processors and 
they run just fine.

Try it.

Regards,
Markus
 
-Original message-
> From:Rahul Goswami 
> Sent: Wednesday 18th September 2019 22:20
> To: solr-user@lucene.apache.org
> Subject: Custom update processor not kicking in
> 
> Hello,
> 
> I am using solr 7.2.1 in a standalone mode. I created a custom update
> request processor and placed it between the distributed processor and run
> update processor in my chain. I made sure the chain is invoked since I see
> log lines from the getInstance() method of my processor factory. But I
> don’t see any log lines from the processAdd() method.
> 
> Any inputs on why the processor is getting skipped if placed after
> distributed processor?
> 
> Thanks,
> Rahul
> 


Custom update processor not kicking in

2019-09-18 Thread Rahul Goswami
Hello,

I am using solr 7.2.1 in a standalone mode. I created a custom update
request processor and placed it between the distributed processor and run
update processor in my chain. I made sure the chain is invoked since I see
log lines from the getInstance() method of my processor factory. But I
don’t see any log lines from the processAdd() method.

Any inputs on why the processor is getting skipped if placed after
distributed processor?

Thanks,
Rahul


DIH: Create Child Documents in ScriptTransformer

2019-09-18 Thread Jörn Franke
Hi,

I load a set of documents. Based on these documents some logic needs to be
applied to split them into chapters (this is done). One whole document is
loaded as a parent. Chapters of the whole document + metadata should be
loaded as child documents of this parent.
I want to now collect information on how this can be done:
* Use a custom loader - this is possible and works
* Use DIH and extract the chapters in a ScriptTransformer and add them as
child documents there. However, the scripttransformer receives as input
only a HashMap and while it works to transform field values etc. It does
not seem possible to add childdocuments within the DIH scripttransformer. I
tried adding a JavaArray with SolrInputDocuments, but this does not seem to
work. I see in debug/verbose mode that indeed the transformer adds them to
the HashMap correctly, but they don't end up in the document. Maybe here it
could be possible somehow via nested entities?
* Use DIH+ an UpdateProcessor (Script): there i get the SolrInputDocument
as a parameter and it seems feasible to extract chapters and add them as
child documents.

thank you.

best regards


Re: Looking for some guide on how to do the index on a folder of data in Solr 7.2

2019-09-18 Thread Angie Rabelero
post.jar was removed in solr 5 I think. There are ways to index your files you 
can use the post tool https://lucene.apache.org/solr/guide/8_1/post-tool.html 
, or you can try tika 
to extract text from docuements, or you can use curl 
https://lucene.apache.org/solr/guide/8_1/uploading-data-with-index-handlers.html#using-curl-to-perform-updates
 

  

On Sep 18, 2019, at 13:33, Raymond Xie  wrote:

I remember there is a post.jar in Cloudera's Solr (very old version) that
allows indexing doc like:

java -Dtype=application/json -Drecursive -Durl="
https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8983_solr_indexer-5Fodac_update_json_docs=DwIBaQ=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE=lUsTzFRk0CX38HvagQ0wd52D67dA0fx_D6M6F3LHzAU=46aWsPOdFln3UfXqa4uKg7kfgMDRN4sPY-mHbsuWcTs=ZiW2uFD77PXO_3ZCczSQ4DAY5O_dOSYy5pUOpOBRFjI=
 " -jar post.jar
/tmp/solr_data/data

I don't see the post.jar in Solr 7.2 anymore, it is just "post", not
"post.jar"

Can you tell me what is the right command to do the index on a folder? I am
not able to find that information in the documentation.

Thank you very much.

On Tue, Sep 17, 2019 at 9:42 AM Raymond Xie  wrote:

> Thank you Paras for your reply, yes I downloaded src, after re-download
> the binary, it is working as expected here.
> 
> **
> *Sincerely yours,*
> 
> 
> *Raymond*
> 
> 
> On Tue, Sep 17, 2019 at 9:26 AM Paras Lehana 
> wrote:
> 
>> Hi Raymond,
>> 
>> ERROR: start.jar file not found in /opt/solr-8.2.0/solr/server!
>>> 
>> 
>> You had probably downloaded the source version. *Download the binary one*
>> (TGZ
>> >  >
>> or ZIP
>> >  >).
>> Yes, it does mean that the package is incomplete.
>> 
>> On Tue, 17 Sep 2019 at 18:40, Raymond Xie  wrote:
>> 
>>> Thank you Paras:
>>> 
>>> If I am already user of root, and still run sudo? no, it doesn't work:
>>> [root@pocnnr1n1 solr]# sudo bin/solr start -force
>>> sudo: bin/solr: command not found
>>> 
>>> [root@pocnnr1n1 solr]# ls -l bin/solr
>>> -rw-r--r-- 1 root root 80630 Jul 19 09:09 bin/solr
>>> 
>>> So, I followed your suggestion and added +x, now run the command again:
>>> [root@pocnnr1n1 solr]# bin/solr start
>>> *** [WARN] *** Your open file limit is currently 1024.
>>> It should be set to 65000 to avoid operational disruption.
>>> If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to
>>> false in your profile or solr.in.sh
>>> *** [WARN] ***  Your Max Processes Limit is currently 63397.
>>> It should be set to 65000 to avoid operational disruption.
>>> If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to
>>> false in your profile or solr.in.sh
>>> WARNING: Starting Solr as the root user is a security risk and not
>>> considered best practice. Exiting.
>>> Please consult the Reference Guide. To override this check,
>>> start with argument '-force'
>>> 
>>> alright, I'll add the -force option:
>>> [root@pocnnr1n1 solr]# bin/solr start -force
>>> *** [WARN] *** Your open file limit is currently 1024.
>>> It should be set to 65000 to avoid operational disruption.
>>> If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to
>>> false in your profile or solr.in.sh
>>> *** [WARN] ***  Your Max Processes Limit is currently 63397.
>>> It should be set to 65000 to avoid operational disruption.
>>> If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to
>>> false in your profile or solr.in.sh
>>> 
>>> ERROR: start.jar file not found in /opt/solr-8.2.0/solr/server!
>>> Please check your -d parameter to set the correct Solr server directory.
>>> 
>>> BUT: the folder server is there, and no start.jar
>>> 
>>> [root@pocnnr1n1 solr]# ls /opt/solr-8.2.0/solr
>>> bin  common-build.xml  licensesserver
>>> webapp
>>> bin-test contrib   LICENSE.txt site
>>> build.xmlcore  LUCENE_CHANGES.txt  solrj
>>> CHANGES.txt  docs  NOTICE.txt  solr-ref-guide
>>> cloud-devexample   README.txt  test-framework
>>> 
>>> [root@pocnnr1n1 server]# ll
>>> total 16
>>> drwxr-xr-x 2 root root6 Jul 19 09:09 solr-webapp
>>> drwxr-xr-x 3 root root   27 Jul 19 09:09 scripts
>>> 

Looking for some guide on how to do the index on a folder of data in Solr 7.2

2019-09-18 Thread Raymond Xie
I remember there is a post.jar in Cloudera's Solr (very old version) that
allows indexing doc like:

java -Dtype=application/json -Drecursive -Durl="
http://localhost:8983/solr/indexer_odac/update/json/docs; -jar post.jar
/tmp/solr_data/data

I don't see the post.jar in Solr 7.2 anymore, it is just "post", not
"post.jar"

Can you tell me what is the right command to do the index on a folder? I am
not able to find that information in the documentation.

Thank you very much.

On Tue, Sep 17, 2019 at 9:42 AM Raymond Xie  wrote:

> Thank you Paras for your reply, yes I downloaded src, after re-download
> the binary, it is working as expected here.
>
> **
> *Sincerely yours,*
>
>
> *Raymond*
>
>
> On Tue, Sep 17, 2019 at 9:26 AM Paras Lehana 
> wrote:
>
>> Hi Raymond,
>>
>> ERROR: start.jar file not found in /opt/solr-8.2.0/solr/server!
>>>
>>
>> You had probably downloaded the source version. *Download the binary one*
>> (TGZ
>> 
>> or ZIP
>> ).
>> Yes, it does mean that the package is incomplete.
>>
>> On Tue, 17 Sep 2019 at 18:40, Raymond Xie  wrote:
>>
>>> Thank you Paras:
>>>
>>> If I am already user of root, and still run sudo? no, it doesn't work:
>>> [root@pocnnr1n1 solr]# sudo bin/solr start -force
>>> sudo: bin/solr: command not found
>>>
>>> [root@pocnnr1n1 solr]# ls -l bin/solr
>>> -rw-r--r-- 1 root root 80630 Jul 19 09:09 bin/solr
>>>
>>> So, I followed your suggestion and added +x, now run the command again:
>>> [root@pocnnr1n1 solr]# bin/solr start
>>> *** [WARN] *** Your open file limit is currently 1024.
>>>  It should be set to 65000 to avoid operational disruption.
>>>  If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to
>>> false in your profile or solr.in.sh
>>> *** [WARN] ***  Your Max Processes Limit is currently 63397.
>>>  It should be set to 65000 to avoid operational disruption.
>>>  If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to
>>> false in your profile or solr.in.sh
>>> WARNING: Starting Solr as the root user is a security risk and not
>>> considered best practice. Exiting.
>>>  Please consult the Reference Guide. To override this check,
>>> start with argument '-force'
>>>
>>> alright, I'll add the -force option:
>>> [root@pocnnr1n1 solr]# bin/solr start -force
>>> *** [WARN] *** Your open file limit is currently 1024.
>>>  It should be set to 65000 to avoid operational disruption.
>>>  If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to
>>> false in your profile or solr.in.sh
>>> *** [WARN] ***  Your Max Processes Limit is currently 63397.
>>>  It should be set to 65000 to avoid operational disruption.
>>>  If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to
>>> false in your profile or solr.in.sh
>>>
>>> ERROR: start.jar file not found in /opt/solr-8.2.0/solr/server!
>>> Please check your -d parameter to set the correct Solr server directory.
>>>
>>> BUT: the folder server is there, and no start.jar
>>>
>>> [root@pocnnr1n1 solr]# ls /opt/solr-8.2.0/solr
>>> bin  common-build.xml  licensesserver
>>> webapp
>>> bin-test contrib   LICENSE.txt site
>>> build.xmlcore  LUCENE_CHANGES.txt  solrj
>>> CHANGES.txt  docs  NOTICE.txt  solr-ref-guide
>>> cloud-devexample   README.txt  test-framework
>>>
>>> [root@pocnnr1n1 server]# ll
>>> total 16
>>> drwxr-xr-x 2 root root6 Jul 19 09:09 solr-webapp
>>> drwxr-xr-x 3 root root   27 Jul 19 09:09 scripts
>>> -rw-r--r-- 1 root root 3959 Jul 19 09:09 README.txt
>>> -rw-r--r-- 1 root root 5740 Jul 19 09:09 ivy.xml
>>> -rw-r--r-- 1 root root 2214 Jul 19 09:09 build.xml
>>> drwxr-xr-x 2 root root  135 Sep 16 21:13 etc
>>> drwxr-xr-x 2 root root   36 Sep 16 21:13 contexts
>>> drwxr-xr-x 2 root root   82 Sep 16 21:13 resources
>>> drwxr-xr-x 2 root root   90 Sep 16 21:13 modules
>>> drwxr-xr-x 3 root root   73 Sep 16 21:13 solr
>>>
>>> *So this seems to be something missing from the solr package?*
>>>
>>> *Thank you.*
>>>
>>> **
>>> *Sincerely yours,*
>>>
>>>
>>> *Raymond*
>>>
>>>
>>> On Tue, Sep 17, 2019 at 8:42 AM Paras Lehana 
>>> wrote:
>>>
 Hey Raymond,


 bin/solr start -force


 I know this could be useless, but did you try the following (notice the
 sudo)?

 *sudo* bin/solr start -force


 Also, I suggest you to review permission of solr file by:

 ls -l bin/solr


 If you don't see required executable permissions, you can provide root
 user the permission to execute the file by:

 *chmod +x bin/solr*


 Hope this helps.

 On Tue, 17 Sep 2019 at 18:03, Raymond Xie  wrote:

> Thank you.
>
> As I suspected, this 

Clarification on Solr BlendedInfixLookupFactory with context filtering (suggest.cfq)

2019-09-18 Thread Baskar K
Hi Team,

In our project we are using the Apache Solr and we really thankful to the
framework.

We need a clarification on solr's Blended Infix Lookup Factory with context
filtering.

We checked the documentation seems its supporting the context filtering and
we tried to integrate in our application.  But seems the Blended Infix
Lookup Factory doesn't support context filtering.

Eagerly waiting for your response.

Thanks & Regards,
Baskar K.


Re: Moving a collection to a specific machine?

2019-09-18 Thread Shawn Heisey

On 9/18/2019 8:46 AM, Koen De Groote wrote:

I'm looking into how I can move a collection to a specific machine.

I have a set of machines, some with more/less CPU/RAM/Disk Space.

Basically, I want to either move the specific collection to the appropriate
machine(s). Or somehow say in the configuration "collection X is to only
exist on machine Y".

Is this possible?

I've seen something about SPLITSHARD but the parameters for that don't
appear to accept destinations.


I think you want MOVEREPLICA.

https://lucene.apache.org/solr/guide/8_1/collections-api.html#movereplica

Alternately you could use ADDREPLICA, and when it finishes, use 
DELETEREPLICA.


Thanks,
Shawn


Moving a collection to a specific machine?

2019-09-18 Thread Koen De Groote
Hello,

I'm looking into how I can move a collection to a specific machine.

I have a set of machines, some with more/less CPU/RAM/Disk Space.

Basically, I want to either move the specific collection to the appropriate
machine(s). Or somehow say in the configuration "collection X is to only
exist on machine Y".

Is this possible?

I've seen something about SPLITSHARD but the parameters for that don't
appear to accept destinations.


Re: Question about "No registered leader" error

2019-09-18 Thread Erick Erickson
Check whether the oom killer script was called. If so, there will be
log files obviously relating to that. I've seen nodes mysteriously
disappear as a result of this with no message in the regular solr
logs. If that's the case, you need to increase your heap.

Erick

On Wed, Sep 18, 2019 at 8:21 AM Shawn Heisey  wrote:
>
> On 9/18/2019 6:11 AM, Shawn Heisey wrote:
> > On 9/17/2019 9:35 PM, Hongxu Ma wrote:
> >> My questions:
> >>
> >>*   Is this error possible caused by "long gc pause"? my solr
> >> zkClientTimeout=6
> >
> > It's possible.  I can't say for sure that this is the issue, but it
> > might be.
>
> A followup.  I was thinking about the interactions here.  It looks like
> Solr only waits four seconds for the leader election, and both of the
> pauses you mentioned are longer than that.
>
> Four seconds is probably too short a time to wait, and I do not think
> that timeout is configurable anywhere.
>
> > What version of Solr do you have, and what is your max heap?  The CMS
> > garbage collection that Solr 5.0 and later incorporate by default is
> > pretty good.  My G1 settings might do slightly better, but the
> > improvement won't be dramatic unless your existing commandline has
> > absolutely no gc tuning at all.
>
> That question will be important.  If you already have our CMS GC tuning,
> switching to G1 probably is not going to solve this.  Lowering the max
> heap might be the only viable solution in that case, and depending on
> what you're dealing with, it will either be impossible or it will
> require more servers.
>
> Thanks,
> Shawn


Re: Question about "No registered leader" error

2019-09-18 Thread Shawn Heisey

On 9/18/2019 6:11 AM, Shawn Heisey wrote:

On 9/17/2019 9:35 PM, Hongxu Ma wrote:

My questions:

   *   Is this error possible caused by "long gc pause"? my solr 
zkClientTimeout=6


It's possible.  I can't say for sure that this is the issue, but it 
might be.


A followup.  I was thinking about the interactions here.  It looks like 
Solr only waits four seconds for the leader election, and both of the 
pauses you mentioned are longer than that.


Four seconds is probably too short a time to wait, and I do not think 
that timeout is configurable anywhere.


What version of Solr do you have, and what is your max heap?  The CMS 
garbage collection that Solr 5.0 and later incorporate by default is 
pretty good.  My G1 settings might do slightly better, but the 
improvement won't be dramatic unless your existing commandline has 
absolutely no gc tuning at all.


That question will be important.  If you already have our CMS GC tuning, 
switching to G1 probably is not going to solve this.  Lowering the max 
heap might be the only viable solution in that case, and depending on 
what you're dealing with, it will either be impossible or it will 
require more servers.


Thanks,
Shawn


Re: Question about "No registered leader" error

2019-09-18 Thread Shawn Heisey

On 9/17/2019 9:35 PM, Hongxu Ma wrote:

My questions:

   *   Is this error possible caused by "long gc pause"? my solr 
zkClientTimeout=6


It's possible.  I can't say for sure that this is the issue, but it 
might be.



   *   If so, how can I prevent this error happen? My thoughts: using G1 
collector (as 
https://cwiki.apache.org/confluence/display/SOLR/ShawnHeisey#ShawnHeisey-GCTuningforSolr)
 or enlarge zkClientTimeout again, what's your idea?


If your ZK server ticktime setting is the typical value of 2000, that 
means that the largest value you can use for the ZK timeout (which 
Solr's zkClientTimeout value ultimately gets used to set) is 40 seconds 
-- 20 times the ticktime is the biggest value ZK will allow.


So if your ZK server ticktime is 2000 milliseconds, you're not actually 
getting 60 seconds, and I don't know what happens when you try ... I 
would expect ZK to either just use its max value or ignore the setting 
entirely, and I do not know which it is.  That's something we should ask 
the ZK mailing list and/or do testing on.


Dealing with the the "no registered leader" problem probably will 
involve restarting at least one of the Solr server JVMs in the cloud, 
and if that doesn't work, restart all of them.


What version of Solr do you have, and what is your max heap?  The CMS 
garbage collection that Solr 5.0 and later incorporate by default is 
pretty good.  My G1 settings might do slightly better, but the 
improvement won't be dramatic unless your existing commandline has 
absolutely no gc tuning at all.


Thanks,
Shawn