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

ASF GitHub Bot commented on SOLR-9954:
--------------------------------------

GitHub user thelabdude opened a pull request:

    https://github.com/apache/lucene-solr/pull/137

    SOLR-9954: Prevent against failure during failed snapshot cleanup fro…

    …m swallowing the actual cause for the snapshot to fail.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/lucene-solr jira/solr-9954

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucene-solr/pull/137.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #137
    
----
commit 4856550b45548f376b6292aeef4d501fd3d85fd2
Author: Timothy Potter <[email protected]>
Date:   2017-01-11T00:33:50Z

    SOLR-9954: Prevent against failure during failed snapshot cleanup from 
swallowing the actual cause for the snapshot to fail.

----


> SnapShooter createSnapshot can swallow an exception raised by the underlying 
> backup repo
> ----------------------------------------------------------------------------------------
>
>                 Key: SOLR-9954
>                 URL: https://issues.apache.org/jira/browse/SOLR-9954
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Hadoop Integration
>    Affects Versions: 6.2.1, 6.3
>            Reporter: Timothy Potter
>            Assignee: Timothy Potter
>         Attachments: SOLR-9954.patch
>
>
> While configuring the HdfsBackupRepository to use Google compute storage, I 
> misconfigured the permissions on my bucket. Unfortunately, the exception that 
> would have pointed me in the right direction gets squelched by the finally 
> block in createSnapshot:
> {code}
>     } finally {
>       if (!success) {
>         backupRepo.deleteDirectory(snapshotDirPath);
>       }
>     }
> {code}
> If there's a permissions issue, then the deleteDelectory is going to fail and 
> raise another exception from the finally block, which swallows the original 
> exception. For example:
> {code}
> ERROR - 2017-01-10 18:38:52.650; [c:gettingstarted s:shard1 r:core_node1 
> x:gettingstarted_shard1_replica1] org.apache.solr.handler.SnapShooter; 
> Exception while creating snapshot
> java.io.IOException: GoogleHadoopFileSystem has been closed or not 
> initialized.
>     at 
> com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystemBase.checkOpen(GoogleHadoopFileSystemBase.java:1927)
>     at 
> com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystemBase.delete(GoogleHadoopFileSystemBase.java:1255)
>     at 
> org.apache.solr.core.backup.repository.HdfsBackupRepository.deleteDirectory(HdfsBackupRepository.java:160)
>     at 
> org.apache.solr.handler.SnapShooter.createSnapshot(SnapShooter.java:234)
>     at 
> org.apache.solr.handler.SnapShooter.lambda$createSnapAsync$1(SnapShooter.java:186)
>     at org.apache.solr.handler.SnapShooter$$Lambda$89/43739789.run(Unknown 
> Source)
>     at java.lang.Thread.run(Thread.java:745)
> {code}
> That's merely the symptom and not the actual cause of the failure.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to