[
https://issues.apache.org/jira/browse/SOLR-11925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349809#comment-16349809
]
David Smiley commented on SOLR-11925:
-------------------------------------
The attached patch deletes old collections immediately before creating a new
collection. Includes test. The only nocommit is to rename
RoutedAliasCreateCollectionCmd to MaintainRoutedAliasCmd since it doesn't just
create now.
Misc Time Routed Alias changes:
*
org.apache.solr.client.solrj.request.CollectionAdminRequest.ModifyAlias#addMetadata
now returns "this" to support chained method calls
Included with this patch are some internal refactorings/improvements:
* CollectionsHandler.handleResponse is now named sendToOCPQueue (I chose the
same name as operation.sendToOCPQueue boolean field). The API contract of this
method is simpler to understand as well; it does not take in the
SolrQueryResponse.
* Added SolrResponse.getException that parses out the "exception" with response
code & message to create a SolrException. This logic used to be in
handleResponse/sendToOCPQueue but it's generally useful and helped enable the
improved method signature. Two of sendToOCPQueue()'s callers use this method.
* DateMathParser now has a constructor that takes *both* "now" and the
timezone; formerly it only had one for the timezone and it required that you
call setNow if you wanted to do that. I felt that was a weird asymmetry; both
can be done through the constructor now.
> Auto delete oldest collections in a time routed alias
> -----------------------------------------------------
>
> Key: SOLR-11925
> URL: https://issues.apache.org/jira/browse/SOLR-11925
> Project: Solr
> Issue Type: Sub-task
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SolrCloud
> Reporter: David Smiley
> Assignee: David Smiley
> Priority: Major
> Fix For: 7.3
>
> Attachments: SOLR-11925.patch
>
>
> The oldest collections in a Time Routed Alias should be automatically
> deleted, according to a new alias metadata that establishes how long. It can
> be checked as new data flows in at TimeRoutedAliasUpdateProcessor and thus it
> won't occur if new data isn't coming in.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]