[ 
https://issues.apache.org/jira/browse/SOLR-6760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar updated SOLR-6760:
----------------------------------------
    Attachment: SOLR-6760-branch_5x.patch

Here is a patch which applies to branch_5x.

# I had to use ImmutableSortedSet.of() in DistributedQueue#getChildren because 
there is no Collections.emptySortedSet in Java 7.
# Changed DistributedQueueTest to not use lambdas
# I had to make local variable "data" as final in Overseer so that it could be 
used in the ZkWriteCallback anonymous inner class.

I should also mention that I had to change DistributedQueueTest in the trunk 
patch to use ExecutorUtil for creating the executor service so that 
forbidden-api-checker is happy:
{code}
protected ExecutorService executor = 
ExecutorUtil.newMDCAwareSingleThreadExecutor(new 
SolrjNamedThreadFactory("dqtest-"));
{code}

> New optimized DistributedQueue implementation for overseer
> ----------------------------------------------------------
>
>                 Key: SOLR-6760
>                 URL: https://issues.apache.org/jira/browse/SOLR-6760
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>         Attachments: SOLR-6760-branch_5x.patch, SOLR-6760.patch, 
> SOLR-6760.patch, SOLR-6760.patch, SOLR-6760.patch, deadlock.patch
>
>
> Currently the DQ works as follows
> * read all items in the directory
> * sort them all 
> * take the head and return it and discard everything else
> * rinse and repeat
> This works well when we have only a handful of items in the Queue. If the 
> items in the queue is much larger (in tens of thousands) , this is 
> counterproductive
> As the overseer queue is a multiple producers + single consumer queue, We can 
> read them all in bulk  and before processing each item , just do a 
> zk.exists(itemname) and if all is well we don't need to do the fetch all + 
> sort thing again



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to