[
https://issues.apache.org/jira/browse/SOLR-617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634258#action_12634258
]
Shalin Shekhar Mangar commented on SOLR-617:
--------------------------------------------
The patch looks good. I think this covers all the features we wanted to have.
A few minor nitpicks
# The latestCommit and maxCommitAgeMillis variables in SolrDeletionPolicy are
assigned but never used.
# The additional logging in onInit and onCommit in SolrDeletionPolicy can be
removed -- the same message is logged in FINE and INFO both
# The defaults in solrconfig.xml should mimic the previous behavior i.e. keep
only the last commit point
# Javadocs on IndexDeletionPolicyWrapper#setReserveDuration will be helpful
# IndexDeletionPolicyWrapper#getCommits should return the generic version of
the Map
# IndexDeletionPolicyWrapper#getConfiguredDeletionPolicy can be called
getWrappedDeletionPolicy or just getDeletionPolicy
# Slight mistake in the logging, the info message should be in the same block
{code}
if(keepOptimizedOnly){
if(!commit.isOptimized())
commit.delete();
log.info("Marking unoptimized index "+getId(commit)+ " for
deletion.");
}
{code}
# The getter methods in SolrDeletionPolicy should be named more appropriately
e.g. isKeepOptimizedOnly, getMaxCommitAge, getMaxCommitsToKeep
The tests look good. Thanks for all the work, Akshay :)
> Allow configurable deletion policy
> ----------------------------------
>
> Key: SOLR-617
> URL: https://issues.apache.org/jira/browse/SOLR-617
> Project: Solr
> Issue Type: New Feature
> Components: search, update
> Affects Versions: 1.4
> Reporter: Noble Paul
> Assignee: Shalin Shekhar Mangar
> Priority: Minor
> Fix For: 1.4
>
> Attachments: 617.patch, solr-617.patch, solr-617.patch, solr-617.patch
>
>
> Lucene API provides means to configure deletion policy. Solr should be able
> to expose it through configuration in solrconfig.xml. Moreover the new
> replication (SOLR-561) strategy is going to rely on this .
> I propose the configuration go into the <mainIndex> section
> sample configuration
> {code:xml|title=solrconfig.xml}
> <mainIndex>
> <!-- configure deletion policy here-->
> <deletionPolicy>
> <!-- Store only the commits with optimize.Non optimized commits will
> get deleted by lucene when
> the last IndexWriter/IndexReader using this commit point is
> closed -->
> <keepOptimizedOnly>true</keepOptimizedOnly>
> <!--Maximum no: of commit points stored . Older ones will be cleaned
> when they go out of scope-->
> <maxCommitsToKeep></maxCommitsToKeep>
> <!-- max age of a stored commit-->
> <maxCommitAge></maxCommitAge>
> </deletionPolicy>
>
> </mainIndex>
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.