You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by sunnyfr <jo...@gmail.com> on 2008/10/16 12:10:43 UTC

snapcleaner >> problem solr 1.3

Hi guys,

I've a wierd problem when I try  to fire snapcleaner manually :
Already : is it correct : root@solr-test-2:/data/solr/video#
./bin/snapcleaner -V -D-1

To remove every snapshot older than one day.
It doesn't remove older than one day obviously and debugger show me :

+ [[ -z -1 ]]
+ fixUser -V -D -1
+ [[ -z '' ]]
++ whoami
+ user=root
++ whoami
+ [[ root != root ]]
++ who -m
++ cut '-d ' -f1
++ sed '-es/^.*!//'
+ oldwhoami=root
+ [[ root == '' ]]
+ [[ -z /data/solr/video/data ]]
++ echo /data/solr/video/data
++ cut -c1
+ [[ / != \/ ]]
+ setStartTime
+ [[ Linux == \S\u\n\O\S ]]
++ date +%s
+ start=1224151299
+ logMessage started by root
++ timeStamp
++ date '+%Y/%m/%d %H:%M:%S'
+ echo 2008/10/16 12:01:39 started by root
+ [[ -n '' ]]
+ logMessage command: ./bin/snapcleaner -V -D -1
++ timeStamp
++ date '+%Y/%m/%d %H:%M:%S'
+ echo 2008/10/16 12:01:39 command: ./bin/snapcleaner -V -D -1
+ [[ -n '' ]]
+ trap 'echo "caught INT/TERM, exiting now but partial cleanup may have
already occured";logExit aborted 13' INT TERM
+ [[ -n -1 ]]
+ find /data/solr/video/data -maxdepth 0 -name foobar
+ '[' 0 = 0 ']'
+ maxdepth='-maxdepth 1'
+ logMessage cleaning up snapshots more than -1 days old
++ timeStamp
++ date '+%Y/%m/%d %H:%M:%S'
+ echo 2008/10/16 12:01:39 cleaning up snapshots more than -1 days old
+ [[ -n '' ]]
++ find /data/solr/video/data -maxdepth 1 -name 'snapshot.*' -mtime +-1
-print
find: invalid argument `+-1' to `-mtime'
+ logExit ended 0
+ [[ Linux == \S\u\n\O\S ]]
++ date +%s
+ end=1224151299
++ expr 1224151299 - 1224151299
+ diff=0
++ timeStamp
++ date '+%Y/%m/%d %H:%M:%S'
+ echo '2008/10/16 12:01:39 ended (elapsed time: 0 sec)'
+ exit 0

Any idea why?
thanks 
-- 
View this message in context: http://www.nabble.com/snapcleaner-%3E%3E-problem-solr-1.3-tp20010689p20010689.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: snapcleaner >> problem solr 1.3

Posted by sunnyfr <jo...@gmail.com>.
Hi,

It doesnt seems to work, if I look in my data directory I've all this files
:

apshot.20081015172840  snapshot.20081015183901  snapshot.20081015195358 
snapshot.20081015210546  snapshot.20081015224244  snapshot.20081016013035 
snapshot.20081016105617
snapshot.20081015172841  snapshot.20081015183903  snapshot.20081015195400 
snapshot.20081015210547  snapshot.20081015224247  snapshot.20081016013039 
snapshot.20081016105632
snapshot.20081015172842  snapshot.20081015183905  snapshot.20081015195401 
snapshot.20081015210548  snapshot.20081015224251  snapshot.20081016013042 
snapshot.20081016105714
snapshot.20081015172843  snapshot.20081015183906  snapshot.20081015195402 
snapshot.20081015210550  snapshot.20081015224254  snapshot.20081016013045 
snapshot.20081016105721
snapshot.20081015172844  snapshot.20081015183908  snapshot.20081015195403 
snapshot.20081015210551  snapshot.20081015224258  snapshot.20081016013048 
spellchecker1
snapshot.20081015172845  snapshot.20081015183910  snapshot.20081015195404 
snapshot.20081015210552  snapshot.20081015224301  snapshot.20081016013051 
spellchecker2
snapshot.20081015172846  snapshot.20081015183912  snapshot.20081015195409 
snapshot.20081015210553  snapshot.20081015224302  snapshot.20081016013053 
spellcheckerFile

If I check logs nothing seems to be wrong after : /data/solr/video#
./bin/snapcleaner -D 1

My logs:

2008/10/17 09:10:17 command: ./bin/snapcleaner -D 1
2008/10/17 09:10:17 cleaning up snapshots more than 1 days old
2008/10/17 09:10:17 ended (elapsed time: 0 sec)

Thanks a million,


Chris Haggstrom wrote:
> 
> 
> On Oct 16, 2008, at 4:29 AM, sunnyfr wrote:
> 
>>
>> still nothing changed :
> 
> It looks like it worked better to me, in that it resulted in a valid  
> find command for any snapshots with an -mtime of +1:
> 
> ++ find /data/solr/video/data -maxdepth 1 -name 'snapshot.*' -mtime +1  
> -print
> 
> instead of showing an error like before:
> 
> ++ find /data/solr/video/data -maxdepth 1 -name 'snapshot.*' -mtime  
> +-1 -print
> find: invalid argument `+-1' to `-mtime'
> 
> But it didn't find any snapshots to remove.   Do you have any  
> snapshots that haven't been modified in 2+ days?  Due to the way find - 
> mtime works (looking at the modification day, and ignoring fractions  
> of days), for a snapshot to match, it would have to not have been  
> modified for a couple days.
> 
> -Chris
> 
> 

-- 
View this message in context: http://www.nabble.com/snapcleaner-%3E%3E-problem-solr-1.3-tp20010689p20027791.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: snapcleaner >> problem solr 1.3

Posted by Chris Haggstrom <ch...@gmail.com>.
On Oct 16, 2008, at 4:29 AM, sunnyfr wrote:

>
> still nothing changed :

It looks like it worked better to me, in that it resulted in a valid  
find command for any snapshots with an -mtime of +1:

++ find /data/solr/video/data -maxdepth 1 -name 'snapshot.*' -mtime +1  
-print

instead of showing an error like before:

++ find /data/solr/video/data -maxdepth 1 -name 'snapshot.*' -mtime  
+-1 -print
find: invalid argument `+-1' to `-mtime'

But it didn't find any snapshots to remove.   Do you have any  
snapshots that haven't been modified in 2+ days?  Due to the way find - 
mtime works (looking at the modification day, and ignoring fractions  
of days), for a snapshot to match, it would have to not have been  
modified for a couple days.

-Chris

Re: snapcleaner >> problem solr 1.3

Posted by sunnyfr <jo...@gmail.com>.
still nothing changed :

root@solr-test-2:/data/solr/video# ./bin/snapcleaner -V -D 1
+ [[ -z 1 ]]
+ fixUser -V -D 1
+ [[ -z '' ]]
++ whoami
+ user=root
++ whoami
+ [[ root != root ]]
++ who -m
++ cut '-d ' -f1
++ sed '-es/^.*!//'
+ oldwhoami=root
+ [[ root == '' ]]
+ [[ -z /data/solr/video/data ]]
++ echo /data/solr/video/data
++ cut -c1
+ [[ / != \/ ]]
+ setStartTime
+ [[ Linux == \S\u\n\O\S ]]
++ date +%s
+ start=1224156482
+ logMessage started by root
++ timeStamp
++ date '+%Y/%m/%d %H:%M:%S'
+ echo 2008/10/16 13:28:02 started by root
+ [[ -n '' ]]
+ logMessage command: ./bin/snapcleaner -V -D 1
++ timeStamp
++ date '+%Y/%m/%d %H:%M:%S'
+ echo 2008/10/16 13:28:02 command: ./bin/snapcleaner -V -D 1
+ [[ -n '' ]]
+ trap 'echo "caught INT/TERM, exiting now but partial cleanup may have
already occured";logExit aborted 13' INT TERM
+ [[ -n 1 ]]
+ find /data/solr/video/data -maxdepth 0 -name foobar
+ '[' 0 = 0 ']'
+ maxdepth='-maxdepth 1'
+ logMessage cleaning up snapshots more than 1 days old
++ timeStamp
++ date '+%Y/%m/%d %H:%M:%S'
+ echo 2008/10/16 13:28:02 cleaning up snapshots more than 1 days old
+ [[ -n '' ]]
++ find /data/solr/video/data -maxdepth 1 -name 'snapshot.*' -mtime +1
-print
+ logExit ended 0
+ [[ Linux == \S\u\n\O\S ]]
++ date +%s
+ end=1224156482
++ expr 1224156482 - 1224156482
+ diff=0
++ timeStamp
++ date '+%Y/%m/%d %H:%M:%S'
+ echo '2008/10/16 13:28:02 ended (elapsed time: 0 sec)'
+ exit 0



Chris Haggstrom wrote:
> 
> 
> On Oct 16, 2008, at 3:10 AM, sunnyfr wrote:
>>
>> I've a wierd problem when I try  to fire snapcleaner manually :
>> Already : is it correct : root@solr-test-2:/data/solr/video#
>> ./bin/snapcleaner -V -D-1
>>
>> To remove every snapshot older than one day.
> 
> You need to change "-D -1" to "-D 1".  Otherwise, you're trying to  
> remove snapshots older than -1 days, which is an invalid argument to  
> pass to 'find -mtime' as is shown in these lines of your debug output.
> 
>> It doesn't remove older than one day obviously and debugger show me :
>>
>> + logMessage cleaning up snapshots more than -1 days old
>> ++ find /data/solr/video/data -maxdepth 1 -name 'snapshot.*' -mtime  
>> +-1
>> find: invalid argument `+-1' to `-mtime'
> 
> 
> -Chris
> 
> 

-- 
View this message in context: http://www.nabble.com/snapcleaner-%3E%3E-problem-solr-1.3-tp20010689p20011746.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: snapcleaner >> problem solr 1.3

Posted by Chris Haggstrom <ch...@gmail.com>.
On Oct 16, 2008, at 3:10 AM, sunnyfr wrote:
>
> I've a wierd problem when I try  to fire snapcleaner manually :
> Already : is it correct : root@solr-test-2:/data/solr/video#
> ./bin/snapcleaner -V -D-1
>
> To remove every snapshot older than one day.

You need to change "-D -1" to "-D 1".  Otherwise, you're trying to  
remove snapshots older than -1 days, which is an invalid argument to  
pass to 'find -mtime' as is shown in these lines of your debug output.

> It doesn't remove older than one day obviously and debugger show me :
>
> + logMessage cleaning up snapshots more than -1 days old
> ++ find /data/solr/video/data -maxdepth 1 -name 'snapshot.*' -mtime  
> +-1
> find: invalid argument `+-1' to `-mtime'


-Chris