Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
6.3
-
None
Description
I defined two repos for backup/restore, one local and one remote on GCS, e.g.
<backup> <repository name="hdfs" class="org.apache.solr.core.backup.repository.HdfsBackupRepository" default="false"> ... </repository> <repository name="local" class="org.apache.solr.core.backup.repository.LocalFileSystemRepository" default="false"> <str name="location">/tmp/solr-backups</str> </repository> </backup>
Since the CollectionHandler does not pass the "repository" param along, once the BackupCmd gets the ZkNodeProps, it selects the wrong repo!
The error I'm seeing is:
2017-10-26 17:07:27.326 ERROR (OverseerThreadFactory-19-thread-1-processing-n:host:8983_solr) [ ] o.a.s.c.OverseerCollectionMessageHandler Collection: product operation: backup failed:java.nio.file.FileSystemNotFoundException: Provider "gs" not installed at java.nio.file.Paths.get(Paths.java:147) at org.apache.solr.core.backup.repository.LocalFileSystemRepository.resolve(LocalFileSystemRepository.java:82) at org.apache.solr.cloud.BackupCmd.call(BackupCmd.java:99) at org.apache.solr.cloud.OverseerCollectionMessageHandler.processMessage(OverseerCollectionMessageHandler.java:224) at org.apache.solr.cloud.OverseerTaskProcessor$Runner.run(OverseerTaskProcessor.java:463) at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748)
Notice the Local backup repo is being selected in the BackupCmd even though I passed repository=hdfs in my backup command, e.g.
curl "http://localhost:8983/solr/admin/collections?action=BACKUP&name=foo&collection=foo&location=gs://tjp-solr-test/backups&repository=hdfs"
I think the fix here is to include the repository param, see patch. I'll fix for the next 7.x release and those on 6 can just apply the patch here.