[ 
https://issues.apache.org/jira/browse/SOLR-10619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15999326#comment-15999326
 ] 

Cao Manh Dat commented on SOLR-10619:
-------------------------------------

[~dragonsinth] "singleConsumer" ( multiple producer single consumer ) means 
many thread enqueue data to DQ but only one thread remove ( process ) message 
from DQ.
The scenario here is whenever we call to {{firstChild()}} ( {{peek}} or 
{{poll}} ) with {{isDirty}} state equals true. We always {{fetchZkChildren}} 
even when {{knowChildren}} is not empty. This is wasteful in case of 
Overseer.DQ ( single consumer ), ex: 
- {{knowChildren}} already have 20,000 elements
- some other thread offer one more element to the queue, 
- childWatcher is kicked off in the Overseer.DQ, so {{isDirty}} state is set to 
true
- the next time we call {{peek}}, {{fetchZkChildren}} is called to refill 
{{knowChildren}} with 20,001 elements

> When DQ.knowChildren is not empty, DQ should not refetch node children in 
> case of single consumer
> -------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-10619
>                 URL: https://issues.apache.org/jira/browse/SOLR-10619
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Cao Manh Dat
>            Assignee: Cao Manh Dat
>         Attachments: SOLR-10619.patch, SOLR-10619.patch
>
>
> Right now, for every time childWatcher is kicked off. We refetch all children 
> of DQ's node. It is a wasted in case of single consumer.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to