You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "James Dyer (JIRA)" <ji...@apache.org> on 2011/06/07 23:49:59 UTC
[jira] [Created] (SOLR-2578) ReplicationHandler Backups -- clean up
old backups
ReplicationHandler Backups -- clean up old backups
--------------------------------------------------
Key: SOLR-2578
URL: https://issues.apache.org/jira/browse/SOLR-2578
Project: Solr
Issue Type: Improvement
Components: replication (java)
Affects Versions: 3.2, 4.0
Reporter: James Dyer
Priority: Minor
Fix For: 3.3, 4.0
It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (SOLR-2578) ReplicationHandler Backups -- clean
up old backups
Posted by "Hoss Man (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man resolved SOLR-2578.
----------------------------
Resolution: Fixed
James: thanks for the 3x patch, but the svn merge from trunk went clean so i just went that route.
Committed revision 1202969.
Committed revision 1203003.
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Assignee: Hoss Man
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: SOLR-2578.patch, SOLR-2578.patch, SOLR-2578_3x.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-2578) ReplicationHandler Backups -- clean up
old backups
Posted by "Hoss Man (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated SOLR-2578:
---------------------------
Assignee: James Dyer (was: Hoss Man)
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Assignee: James Dyer
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: SOLR-2578.patch, SOLR-2578.patch, SOLR-2578_3x.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-2578) ReplicationHandler Backups -- clean up
old backups
Posted by "James Dyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Dyer updated SOLR-2578:
-----------------------------
Attachment: SOLR-2578.patch
This patch adds the functionality with a new parameter: numberToKeep . The unit test has been enhanced to do 2 backups and then check to see if the first one was automatically deleted (numberToKeep=1).
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Priority: Minor
> Fix For: 3.3, 4.0
>
> Attachments: SOLR-2578.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Assigned] (SOLR-2578) ReplicationHandler Backups -- clean
up old backups
Posted by "Hoss Man (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man reassigned SOLR-2578:
------------------------------
Assignee: Hoss Man
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Assignee: Hoss Man
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: SOLR-2578.patch, SOLR-2578.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2578) ReplicationHandler Backups -- clean
up old backups
Posted by "Neil Hooey (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13215403#comment-13215403 ]
Neil Hooey commented on SOLR-2578:
----------------------------------
Just tested, and it works if you change this line:
{code}
- if( i > numberToKeep-1 ) {
+ if( i++ > numberToKeep-1 ) {
{code}
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Assignee: James Dyer
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: SOLR-2578.patch, SOLR-2578.patch, SOLR-2578_3x.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2578) ReplicationHandler Backups -- clean
up old backups
Posted by "James Dyer (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152085#comment-13152085 ]
James Dyer commented on SOLR-2578:
----------------------------------
Thanks for committing this. I have updated the wiki.
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Assignee: James Dyer
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: SOLR-2578.patch, SOLR-2578.patch, SOLR-2578_3x.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-2578) ReplicationHandler Backups -- clean up
old backups
Posted by "James Dyer (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Dyer updated SOLR-2578:
-----------------------------
Attachment: SOLR-2578_3x.patch
Here's a patch for 3.x
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Assignee: Hoss Man
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: SOLR-2578.patch, SOLR-2578.patch, SOLR-2578_3x.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2578) ReplicationHandler Backups -- clean
up old backups
Posted by "Neil Hooey (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13215402#comment-13215402 ]
Neil Hooey commented on SOLR-2578:
----------------------------------
This doesn't seem to work for me on trunk.
It only deletes snapshots if you set numberToKeep=1.
I checked the related commit, and the code is missing an increment of i:
{code}
// In: solr/core/src/java/org/apache/solr/handler/SnapShooter.java
int i=1;
for(OldBackupDirectory dir : dirs) {
if( i > numberToKeep-1 ) {
SnapPuller.delTree(dir.dir);
}
}
{code}
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Assignee: James Dyer
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: SOLR-2578.patch, SOLR-2578.patch, SOLR-2578_3x.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (SOLR-2578) ReplicationHandler Backups -- clean up
old backups
Posted by "Hoss Man (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated SOLR-2578:
---------------------------
Attachment: SOLR-2578.patch
Updated patch to trunk and cleaned up formatting (ie: removed tabs, excessive newlines)
Path looks decent to me, and has a test that passes so I plan on committing to trunk unless anyone objects
(I haven't yet assessed how hard backporting will be -- not an area of the code i'm super knowledgeable on)
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: SOLR-2578.patch, SOLR-2578.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2578) ReplicationHandler Backups -- clean
up old backups
Posted by "James Dyer (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217602#comment-13217602 ]
James Dyer commented on SOLR-2578:
----------------------------------
Thanks for pointing this out, Neil. I opened SOLR-3168 for this bug and will commit the fix shortly.
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Assignee: James Dyer
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: SOLR-2578.patch, SOLR-2578.patch, SOLR-2578_3x.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2578) ReplicationHandler Backups -- clean
up old backups
Posted by "Mark Miller (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151576#comment-13151576 ]
Mark Miller commented on SOLR-2578:
-----------------------------------
bq. so I plan on committing to trunk
+1 - only took a quick scan, but looks nice.
> ReplicationHandler Backups -- clean up old backups
> --------------------------------------------------
>
> Key: SOLR-2578
> URL: https://issues.apache.org/jira/browse/SOLR-2578
> Project: Solr
> Issue Type: Improvement
> Components: replication (java)
> Affects Versions: 3.2, 4.0
> Reporter: James Dyer
> Assignee: Hoss Man
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: SOLR-2578.patch, SOLR-2578.patch, SOLR-2578_3x.patch
>
>
> It would be nice when performing backups if there was an easy way to tell ReplicationHandler to only keep so many and then delete the older ones.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org