lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Thacker (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-6775) Creating backup snapshot null pointer exception
Date Tue, 10 Feb 2015 18:52:13 GMT

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

Varun Thacker commented on SOLR-6775:
-------------------------------------

Looking at one of the Jenkins here are the stack traces - 

{code}
[junit4] ERROR   3.52s | TestReplicationHandlerBackup.doTestBackup <<<
   [junit4]    > Throwable #1: java.io.IOException: Could not remove the following files
(in the order of attempts):
   [junit4]    >    C:\Users\JenkinsSlave\workspace\Lucene-Solr-5.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandlerBackup
E514A9DF49C1148E-001\solr-instance-001\collection1: java.nio.file.DirectoryNotEmptyException:
C:\Users\JenkinsSlave\workspace\Lucene-Solr-5.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandlerBackup
E514A9DF49C1148E-001\solr-instance-001\collection1
   [junit4]    >    C:\Users\JenkinsSlave\workspace\Lucene-Solr-5.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandlerBackup
E514A9DF49C1148E-001\solr-instance-001: java.nio.file.DirectoryNotEmptyException: C:\Users\JenkinsSlave\workspace\Lucene-Solr-5.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandlerBackup
E514A9DF49C1148E-001\solr-instance-001
   [junit4]    >        at __randomizedtesting.SeedInfo.seed([E514A9DF49C1148E:A49F89BA6E7FE7C1]:0)
   [junit4]    >        at org.apache.lucene.util.IOUtils.rm(IOUtils.java:294)
   [junit4]    >        at org.apache.solr.handler.TestReplicationHandler$SolrInstance.tearDown(TestReplicationHandler.java:1509)
   [junit4]    >        at org.apache.solr.handler.TestReplicationHandlerBackup.tearDown(TestReplicationHandlerBackup.java:115)
   [junit4]    >        at java.lang.Thread.run(Thread.java:745)
{code}

and 
{code}
junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestReplicationHandlerBackup -Dtests.method=testBackupOnCommit
-Dtests.seed=E514A9DF49C1148E -Dtests.slow=true -Dtests.locale=pt_PT -Dtests.timezone=Africa/Lubumbashi
-Dtests.asserts=true -Dtests.file.encoding=UTF-8
   [junit4] ERROR   3.18s | TestReplicationHandlerBackup.testBackupOnCommit <<<
   [junit4]    > Throwable #1: java.io.IOException: Could not remove the following files
(in the order of attempts):
   [junit4]    >    C:\Users\JenkinsSlave\workspace\Lucene-Solr-5.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandlerBackup
E514A9DF49C1148E-001\solr-instance-002\collection1: java.nio.file.DirectoryNotEmptyException:
C:\Users\JenkinsSlave\workspace\Lucene-Solr-5.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandlerBackup
E514A9DF49C1148E-001\solr-instance-002\collection1
   [junit4]    >    C:\Users\JenkinsSlave\workspace\Lucene-Solr-5.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandlerBackup
E514A9DF49C1148E-001\solr-instance-002: java.nio.file.DirectoryNotEmptyException: C:\Users\JenkinsSlave\workspace\Lucene-Solr-5.x-Windows\solr\build\solr-core\test\J0\temp\solr.handler.TestReplicationHandlerBackup
E514A9DF49C1148E-001\solr-instance-002
   [junit4]    >        at __randomizedtesting.SeedInfo.seed([E514A9DF49C1148E:CCFC47343639A897]:0)
   [junit4]    >        at org.apache.lucene.util.IOUtils.rm(IOUtils.java:294)
   [junit4]    >        at org.apache.solr.handler.TestReplicationHandler$SolrInstance.tearDown(TestReplicationHandler.java:1509)
   [junit4]    >        at org.apache.solr.handler.TestReplicationHandlerBackup.tearDown(TestReplicationHandlerBackup.java:115)
{code}

It happened because we added this to the solrconfig files - {{<str name="backupAfter">commit</str>}}
which means an extra backup got created which we forgot to remove. I'll put up a patch to
fix it.

One question though - Why doesn't it reproduce on my mac? 

> Creating backup snapshot null pointer exception
> -----------------------------------------------
>
>                 Key: SOLR-6775
>                 URL: https://issues.apache.org/jira/browse/SOLR-6775
>             Project: Solr
>          Issue Type: Bug
>          Components: replication (java)
>    Affects Versions: 4.10
>         Environment: Linux Server, Java version "1.7.0_21", Solr version 4.10.0
>            Reporter: Ryan Hesson
>            Assignee: Shalin Shekhar Mangar
>              Labels: snapshot, solr
>             Fix For: Trunk, 5.1
>
>         Attachments: SOLR-6775.patch, SOLR-6775.patch
>
>
> I set up Solr Replication. I have one master on a server, one slave on another server.
The replication of data appears functioning correctly. The issue is when the master SOLR tries
to create a snapshot backup it gets a null pointer exception. 
> org.apache.solr.handler.SnapShooter createSnapshot method calls org.apache.solr.handler.SnapPuller.delTree(snapShotDir);
at line 162 and the exception happens within  org.apache.solr.handler.SnapPuller at line 1026
because snapShotDir is null. 
> Here is the actual log output:
> 58319963 [qtp12610551-16] INFO  org.apache.solr.core.SolrCore  - newest commit generation
= 349
> 58319983 [Thread-19] INFO  org.apache.solr.handler.SnapShooter  - Creating backup snapshot...
> Exception in thread "Thread-19" java.lang.NullPointerException
>         at org.apache.solr.handler.SnapPuller.delTree(SnapPuller.java:1026)
>         at org.apache.solr.handler.SnapShooter.createSnapshot(SnapShooter.java:162)
>         at org.apache.solr.handler.SnapShooter$1.run(SnapShooter.java:91)
> I may have missed how to set the directory in the documentation but I've looked around
without much luck. I thought the process was to use the same directory as the index data for
the snapshots. Is this a known issue with this release or am I missing how to set the value?
If someone could tell me how to set snapshotdir or confirm that it is an issue and a different
way of backing up the index is needed it would be much appreciated. 



--
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