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

Hoss Man commented on SOLR-5795:
--------------------------------

bq. Hoss, instead of slice.getLeader(), you should use 
ZkStateReader.getLeaderRetry method.

That was actually a deliberate choice:

These deletes are low priority and will re-occur frequently - so it's fine to 
abort quickly as a No-Op, no need to block waiting for a leader. These leader 
checks will also happen very often and on every node very often - so we don't 
want to be hammering Zk with active leader checks/retries in a potential high 
load / leader election / outage situation.  The cached ClusterState info is 
"good enough" -- even if it's stale, the worst case scenario is that multiple 
nodes trigger a handfull redundant deletes, or the deletes are skipped for one 
cycle -- but the next one will take care of it.


> Option to periodically delete docs based on an expiration field -- or ttl 
> specified when indexed.
> -------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5795
>                 URL: https://issues.apache.org/jira/browse/SOLR-5795
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>             Fix For: 4.8, 5.0
>
>         Attachments: SOLR-5795.patch, SOLR-5795.patch, SOLR-5795.patch, 
> SOLR-5795.patch, SOLR-5795.patch, SOLR-5795.patch
>
>
> A question I get periodically from people is how to automatically remove 
> documents from a collection at a certain time (or after a certain amount of 
> time).  
> Excluding from search results using a filter query on a date field is 
> trivial, but you still have to periodically send a deleteByQuery to clean up 
> those older "expired" documents.  And in the case where you want all 
> documents to auto-expire some fixed amount of time when they were indexed, 
> you still have to setup a simple UpdateProcessorto set that expiration date.  
> So i've been thinking it would be nice if there was a simple way to configure 
> solr to do it all for you.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to