You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/02/16 18:30:03 UTC

[GitHub] [lucene-solr] gerlowskija opened a new pull request #2380: SOLR-15087: Allow restoration to existing collections

gerlowskija opened a new pull request #2380:
URL: https://github.com/apache/lucene-solr/pull/2380


   # Description
   
   As originally implemented, SolrCloud's `restore` operation only supported restoring to collections that didn't yet exist.  This was primarily done out of a fear of race conditions involving writes to the collection.  Since then the support for toggling a per-collection "readonly" property has made restoration to existing collections possible, but unimplemented.
   
   # Solution
   
   This PR adds a codepath to restore to an existing collection, assuming it is compatible with the stored backup files. (A backup with 2 shards can't be restored to a collection with 3, etc.).  If the collection doesn't exist, the restoration process continues to create it as it has done done in the past.
   
   # Tests
   
   Manual testing, and automated tests added to AbstractIncrementalBackupTest.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request title.
   - [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended)
   - [x] I have developed this patch against the `master` branch.
   - [ ] I have run `./gradlew check`.
   - [x] I have added tests for my changes.
   - [x] I have added documentation for the [Ref Guide](https://github.com/apache/lucene-solr/tree/master/solr/solr-ref-guide) (for Solr changes only).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] gerlowskija commented on a change in pull request #2380: SOLR-15087: Allow restoration to existing collections

Posted by GitBox <gi...@apache.org>.
gerlowskija commented on a change in pull request #2380:
URL: https://github.com/apache/lucene-solr/pull/2380#discussion_r597922999



##########
File path: solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java
##########
@@ -67,6 +49,26 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.Closeable;

Review comment:
       Definitely no intentional reason - I suspect I just have some variation in my IDE's code-editor settings.
   
   I've bootstrapped my IntelliJ with what comes out of `ant idea` though, so not sure how that could've arisen?  But I'll take a look to make sure I'm not out of line.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] murblanc commented on a change in pull request #2380: SOLR-15087: Allow restoration to existing collections

Posted by GitBox <gi...@apache.org>.
murblanc commented on a change in pull request #2380:
URL: https://github.com/apache/lucene-solr/pull/2380#discussion_r597995754



##########
File path: solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java
##########
@@ -67,6 +49,26 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.Closeable;

Review comment:
       I later realized my IDEA was doing the same thing and I've checked in files too with the same issue.
   I since changed manually the config (settings - editor - java and then at the bottom you can define the ordering and spacing).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] gerlowskija merged pull request #2380: SOLR-15087: Allow restoration to existing collections

Posted by GitBox <gi...@apache.org>.
gerlowskija merged pull request #2380:
URL: https://github.com/apache/lucene-solr/pull/2380


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] murblanc commented on a change in pull request #2380: SOLR-15087: Allow restoration to existing collections

Posted by GitBox <gi...@apache.org>.
murblanc commented on a change in pull request #2380:
URL: https://github.com/apache/lucene-solr/pull/2380#discussion_r577649171



##########
File path: solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java
##########
@@ -67,6 +49,26 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.Closeable;

Review comment:
       Why move the `java` imports to after `org.apache`? Usually the fundamental imports are first, then the rest.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [lucene-solr] murblanc commented on a change in pull request #2380: SOLR-15087: Allow restoration to existing collections

Posted by GitBox <gi...@apache.org>.
murblanc commented on a change in pull request #2380:
URL: https://github.com/apache/lucene-solr/pull/2380#discussion_r597995754



##########
File path: solr/core/src/java/org/apache/solr/cloud/api/collections/RestoreCmd.java
##########
@@ -67,6 +49,26 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.io.Closeable;

Review comment:
       I later realized my IDEA was doing the same thing and I've committed files too with the same issue.
   I since changed manually the config (settings - editor - java and then at the bottom you can define the ordering and spacing).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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