lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shalin Shekhar Mangar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-6637) Solr should have a way to restore a core
Date Wed, 05 Nov 2014 20:54:34 GMT

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

Shalin Shekhar Mangar commented on SOLR-6637:
---------------------------------------------

Thanks for the patch Varun.

A few comments on the patch and the feature in general:
# The usage of restoreLock is wrong. If you issue a second restore then you'll get a IllegalMonitorStateException.
The thread which acquires the lock must be the one which releases it. So just calling unlock
from another request thread won't work. The RestoreCore thread must be the one to acquire
and release the lock (in a finally clause)
# You should cancel the future interruptibly in the close hook. Just executor service's awaitTermination
is not enough.
# There are no guarantees here that the previous backup was actually complete before you start
restoring it. This might need another issue to fix the snapshoot command itself.
# If restoreFuture is null (no restore has ever been requested), the restore status will return
"in progress".
# Considering that a restore is a full replace of the older index, we can just use the same
index.properties method that SnapPuller uses to ask SolrCore to reload with a new index directory.
That would eliminate the copying around files to the index directory.
# There should be an option to not copy files from the source location at all and instead
to just use it directly as the new index directory.
# We should be able to rollback to original state (old directory) if the new index fails integrity
checks.

We need tests for all these scenarios. I'd also like to see more code being refactored and
shared between Snapshoot, Snappuller and RestoreCore.

> Solr should have a way to restore a core
> ----------------------------------------
>
>                 Key: SOLR-6637
>                 URL: https://issues.apache.org/jira/browse/SOLR-6637
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Varun Thacker
>         Attachments: SOLR-6637.patch, SOLR-6637.patch, SOLR-6637.patch, SOLR-6637.patch,
SOLR-6637.patch
>
>
> We have a core backup command which backs up the index. We should have a restore command
too. 
> This would restore any named snapshots created by the replication handlers backup command.
> While working on this patch right now I realized that during backup we only backup the
index. Should we backup the conf files also? Any thoughts? I could separate Jira for this.



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

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


Mime
View raw message