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

Shalin Shekhar Mangar commented on SOLR-10983:
----------------------------------------------

Nice catch!

Your patch solves another problem -- today if an exception happens, we run 
through items in the work-queue and the last item from state-update-queue (the 
one during which the exception happened) so we run the same item twice.

Considering that DOWNNODE is the only command that enqueues multiple 
ZkWriteCommands, I think we should add a method to ZkStateWriter which calls 
enqueue only once for the entire batch. That and your patch solve all problems 
nicely i.e. 
# DOWNNODE creating multiple work queue items 
# Exceptions not clearing work queue
# Overseer executing same item twice from work queue and state update queue on 
an exception

> Fix DOWNNODE -> queue-work explosion
> ------------------------------------
>
>                 Key: SOLR-10983
>                 URL: https://issues.apache.org/jira/browse/SOLR-10983
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrCloud
>            Reporter: Scott Blum
>            Assignee: Scott Blum
>         Attachments: SOLR-10983.patch
>
>
> Every DOWNNODE command enqueues N copies of itself into queue-work, where N 
> is number of collections affected by the DOWNNODE.
> This rarely matters in practice, because queue-work gets immediately dumped-- 
> however, if anything throws an exception (such as ZK bad version), we don't 
> clear queue-work.  Then the next time through the loop we run the expensive 
> DOWNNODE command potentially hundreds of times.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to