Hi,

I would like to create a patch for this, but I am new here, and how do I
create a bug for it in Jira?

Thanks,

Jianhan

---------- Forwarded message ----------
From: Jian Han Guo <jian...@gmail.com>
Date: Tue, Apr 28, 2009 at 10:43 AM
Subject: Re: fail to create or find snapshoot
To: solr-u...@lucene.apache.org


I think this is a bug.

I looked at the classes SnapShooter, and it's constructor looks like this:


public SnapShooter(SolrCore core) {
  solrCore = core;
}

This leaves the variable snapDir to be null, and the variable is never
initialized elsewhere, and later in the function SnapShooter.createSnapshot,
the line

snapShotDir = new File(snapDir, directoryName);

is equivalent to

snapShotDir = new File(directoryName);

because snapDir is null, and therefor the snapshot is created in the
directory where the application is launched. A line should be added to the
contructor like this:


public SnapShooter(SolrCore core) {
  solrCore = core;
  snapDir = core.getDataDir();
}



This is not a problem during development, but it is when you want to deploy
the application to different environments and to schedule snapshot for
backup. Can somebody take a look at this problem?

Thanks,

Jianhan




On Mon, Apr 27, 2009 at 12:02 PM, Jian Han Guo <jian...@gmail.com> wrote:

> Actually, I found the snapshot in the directory where solr was lauched. Is
> this done on purpose? shouldn't it be in the data directory?
>
> Thanks,
>
> Jianhan
>
>
>
> On Mon, Apr 27, 2009 at 11:43 AM, Jian Han Guo <jian...@gmail.com> wrote:
>
>> Hi,
>>
>> According to Solr's wiki page http://wiki.apache.org/solr/SolrReplication,
>> if I send the following request to master, a snapshoot will be created
>>
>> http://master_host:port/solr/replication?command=snapshoot<http://master_host/solr/replication?command=snapshoot>
>>
>>
>> But after I did it, nothing seemed happening.
>>
>> I got this response back,
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <response>
>> <lst name="responseHeader"><int name="status">0</int><int
>> name="QTime">2</int></lst>
>> </response>
>>
>> and I checked the data directory, no snapshoot was created.
>>
>> I am not sure what to expect after making the request, and where to find
>> the snapshoot files (and what they are).
>>
>> Thanks,
>>
>> Jianhan
>>
>>
>>
>>
>>
>>
>

Reply via email to