You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Dmitry Serebrennikov <dm...@earthlink.net> on 2003/09/24 04:28:40 UTC

Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588), again

Ok, the patch proposed by Christoph has another problem. It ends up 
openning IndexReader twice, but closes it only once. This leaves files 
open that shows up with running TestIndexReader with FSDirectory.
I's just brackets on the if that were missing. I'm attaching an updated 
patch and a modified TestIndexReader.java test file. It now has more 
checks, comments, and a few more test cases.

By the way, what's the policy on commits? Do I need to some +1s before 
committing fixes like this? What about larger changes like the file 
handles? (Assuming that my commit access still works).

Thanks.
Dmitry.





Re: 1.3 release

Posted by Doug Cutting <cu...@lucene.com>.
Doug Cutting wrote:
> Make sure this file is not 
> readable by others, as otherwise ssh will refuse to use it.

I think it's actually not supposed to be writable: readable is okay. 
The main point is that ssh can be picky about file protections.

Doug


Re: 1.3 release

Posted by Doug Cutting <cu...@lucene.com>.
Dmitry Serebrennikov wrote:
> Thanks very much, Doug. I'll give this a shot tonight. This is basically 
> what I tried to do, except that I used rsa key instead of dsa, did not 
> know about having the public key file unreadable to others, placed it
> ~/.ssh/authorized_keys directory (is authorized_keys2 in your example a 
> plain file?), and didn't use :ext: in the -d option to cvs. I guess 
> there's planty here that would have made it not work.:)

authorized_keys2 is for dsa keys, used by the ssh version 2 protocol, 
while authorized_keys is for rsa keys used by ssh versioon 1 protocol. 
I seem to recall that Apache maybe only uses ssh v2, that's why I 
recommended it.  I've generated and installed both sorts of keys, but 
'ssh -v' appears to report that the dsa key is the one actually used.

I'm no expert at this stuff.  I too find it confusing.  But I can get it 
to work.  So please only interpret my instructions as steps in the right 
direction.

Doug


Re: 1.3 release [!! SPAM]

Posted by Konstantin Piroumian <kp...@apache.org>.
Dmitry,

you'll find a good HowTo on CVS through SSH:
http://xml.apache.org/forrest/community/howto/cvs-ssh/howto-cvs-ssh.html

--  Konstantin Piroumian (kpiroumian@apache.org)


From: "Dmitry Serebrennikov" <dm...@earthlink.net>
> Doug Cutting wrote:
>
> > Dmitry Serebrennikov wrote:
> >
> >> Sounds good. I tried to get some progress on committing last night,
> >> but I got bogged down in trying to figuire out ssh. I was just trying
> >> to avoid having to type in my password with every cvs command. It
> >> seems that ssh is the way to do that, but the one try I had given it
> >> last night didn't work.
> >
> >
> > I use cygwin on Win32 with success.
> >
> > On your Windows box you need to:
> >
> > 1. Install cygwin.  Be sure to be sure to select the cvs and openssh
> > packages when you install, in the "Devel" and "Net" categories,
> > respectively.
> >
> > 2. Set some Win32 environment variables.  I do this in System
> > Properties > Advanced > Environment Variables, although you can also
> > do it in c:\autoexec.bat, or probably in other places.
> >
> > Set CVS_RSH = ssh.
> >
> > If you want to use CVS from tools other than a cygwin shell (e.g.,
> > Emacs) then also put c:\cygwin\usr\bin on PATH.
> >
> > 3. From a cygwin shell, use 'ssh-keygen -t dsa' to generate a key on
> > your Win32 box.  Leave the password empty if you want to not have to
> > type one everytime you use CVS.
> >
> > 4. Append the contents of ~/.ssh/id_dsa.pub on your Win32 box to
> > cvs.apache.org:~/.ssh/authorized_keys2.  Make sure this file is not
> > readable by others, as otherwise ssh will refuse to use it.
> >
> > 5. Try "cvs -d :ext:dmitrys@cvs.apache.org:/home/cvs co jakarta-lucene".
> >
> > You can also setup Putty to use your cygwin-generated private key.
> >
> > I hope I got all that right!
> >
> > Doug
>
> Thanks very much, Doug. I'll give this a shot tonight. This is basically
> what I tried to do, except that I used rsa key instead of dsa, did not
> know about having the public key file unreadable to others, placed it
> ~/.ssh/authorized_keys directory (is authorized_keys2 in your example a
> plain file?), and didn't use :ext: in the -d option to cvs. I guess
> there's planty here that would have made it not work.:)
>
> Dmitry.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: 1.3 release [!! SPAM]

Posted by Konstantin Piroumian <kp...@apache.org>.
Dmitry,

you'll find a good HowTo on CVS through SSH:
http://xml.apache.org/forrest/community/howto/cvs-ssh/howto-cvs-ssh.html

--  Konstantin Piroumian (kpiroumian@apache.org)


From: "Dmitry Serebrennikov" <dm...@earthlink.net>
> Doug Cutting wrote:
>
> > Dmitry Serebrennikov wrote:
> >
> >> Sounds good. I tried to get some progress on committing last night,
> >> but I got bogged down in trying to figuire out ssh. I was just trying
> >> to avoid having to type in my password with every cvs command. It
> >> seems that ssh is the way to do that, but the one try I had given it
> >> last night didn't work.
> >
> >
> > I use cygwin on Win32 with success.
> >
> > On your Windows box you need to:
> >
> > 1. Install cygwin.  Be sure to be sure to select the cvs and openssh
> > packages when you install, in the "Devel" and "Net" categories,
> > respectively.
> >
> > 2. Set some Win32 environment variables.  I do this in System
> > Properties > Advanced > Environment Variables, although you can also
> > do it in c:\autoexec.bat, or probably in other places.
> >
> > Set CVS_RSH = ssh.
> >
> > If you want to use CVS from tools other than a cygwin shell (e.g.,
> > Emacs) then also put c:\cygwin\usr\bin on PATH.
> >
> > 3. From a cygwin shell, use 'ssh-keygen -t dsa' to generate a key on
> > your Win32 box.  Leave the password empty if you want to not have to
> > type one everytime you use CVS.
> >
> > 4. Append the contents of ~/.ssh/id_dsa.pub on your Win32 box to
> > cvs.apache.org:~/.ssh/authorized_keys2.  Make sure this file is not
> > readable by others, as otherwise ssh will refuse to use it.
> >
> > 5. Try "cvs -d :ext:dmitrys@cvs.apache.org:/home/cvs co jakarta-lucene".
> >
> > You can also setup Putty to use your cygwin-generated private key.
> >
> > I hope I got all that right!
> >
> > Doug
>
> Thanks very much, Doug. I'll give this a shot tonight. This is basically
> what I tried to do, except that I used rsa key instead of dsa, did not
> know about having the public key file unreadable to others, placed it
> ~/.ssh/authorized_keys directory (is authorized_keys2 in your example a
> plain file?), and didn't use :ext: in the -d option to cvs. I guess
> there's planty here that would have made it not work.:)
>
> Dmitry.
>


Re: 1.3 release

Posted by Doug Cutting <cu...@lucene.com>.
Dmitry Serebrennikov wrote:
> Thanks very much, Doug. I'll give this a shot tonight. This is basically 
> what I tried to do, except that I used rsa key instead of dsa, did not 
> know about having the public key file unreadable to others, placed it
> ~/.ssh/authorized_keys directory (is authorized_keys2 in your example a 
> plain file?), and didn't use :ext: in the -d option to cvs. I guess 
> there's planty here that would have made it not work.:)

authorized_keys2 is for dsa keys, used by the ssh version 2 protocol, 
while authorized_keys is for rsa keys used by ssh versioon 1 protocol. 
I seem to recall that Apache maybe only uses ssh v2, that's why I 
recommended it.  I've generated and installed both sorts of keys, but 
'ssh -v' appears to report that the dsa key is the one actually used.

I'm no expert at this stuff.  I too find it confusing.  But I can get it 
to work.  So please only interpret my instructions as steps in the right 
direction.

Doug


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: 1.3 release

Posted by Dmitry Serebrennikov <dm...@earthlink.net>.
Doug Cutting wrote:

> Dmitry Serebrennikov wrote:
>
>> Sounds good. I tried to get some progress on committing last night, 
>> but I got bogged down in trying to figuire out ssh. I was just trying 
>> to avoid having to type in my password with every cvs command. It 
>> seems that ssh is the way to do that, but the one try I had given it 
>> last night didn't work.
>
>
> I use cygwin on Win32 with success.
>
> On your Windows box you need to:
>
> 1. Install cygwin.  Be sure to be sure to select the cvs and openssh 
> packages when you install, in the "Devel" and "Net" categories, 
> respectively.
>
> 2. Set some Win32 environment variables.  I do this in System 
> Properties > Advanced > Environment Variables, although you can also 
> do it in c:\autoexec.bat, or probably in other places.
>
> Set CVS_RSH = ssh.
>
> If you want to use CVS from tools other than a cygwin shell (e.g., 
> Emacs) then also put c:\cygwin\usr\bin on PATH.
>
> 3. From a cygwin shell, use 'ssh-keygen -t dsa' to generate a key on 
> your Win32 box.  Leave the password empty if you want to not have to 
> type one everytime you use CVS.
>
> 4. Append the contents of ~/.ssh/id_dsa.pub on your Win32 box to 
> cvs.apache.org:~/.ssh/authorized_keys2.  Make sure this file is not 
> readable by others, as otherwise ssh will refuse to use it.
>
> 5. Try "cvs -d :ext:dmitrys@cvs.apache.org:/home/cvs co jakarta-lucene".
>
> You can also setup Putty to use your cygwin-generated private key.
>
> I hope I got all that right!
>
> Doug

Thanks very much, Doug. I'll give this a shot tonight. This is basically 
what I tried to do, except that I used rsa key instead of dsa, did not 
know about having the public key file unreadable to others, placed it
~/.ssh/authorized_keys directory (is authorized_keys2 in your example a 
plain file?), and didn't use :ext: in the -d option to cvs. I guess 
there's planty here that would have made it not work.:)

Dmitry.

>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: 1.3 release

Posted by Dmitry Serebrennikov <dm...@earthlink.net>.
Doug Cutting wrote:

> Dmitry Serebrennikov wrote:
>
>> Sounds good. I tried to get some progress on committing last night, 
>> but I got bogged down in trying to figuire out ssh. I was just trying 
>> to avoid having to type in my password with every cvs command. It 
>> seems that ssh is the way to do that, but the one try I had given it 
>> last night didn't work.
>
>
> I use cygwin on Win32 with success.
>
> On your Windows box you need to:
>
> 1. Install cygwin.  Be sure to be sure to select the cvs and openssh 
> packages when you install, in the "Devel" and "Net" categories, 
> respectively.
>
> 2. Set some Win32 environment variables.  I do this in System 
> Properties > Advanced > Environment Variables, although you can also 
> do it in c:\autoexec.bat, or probably in other places.
>
> Set CVS_RSH = ssh.
>
> If you want to use CVS from tools other than a cygwin shell (e.g., 
> Emacs) then also put c:\cygwin\usr\bin on PATH.
>
> 3. From a cygwin shell, use 'ssh-keygen -t dsa' to generate a key on 
> your Win32 box.  Leave the password empty if you want to not have to 
> type one everytime you use CVS.
>
> 4. Append the contents of ~/.ssh/id_dsa.pub on your Win32 box to 
> cvs.apache.org:~/.ssh/authorized_keys2.  Make sure this file is not 
> readable by others, as otherwise ssh will refuse to use it.
>
> 5. Try "cvs -d :ext:dmitrys@cvs.apache.org:/home/cvs co jakarta-lucene".
>
> You can also setup Putty to use your cygwin-generated private key.
>
> I hope I got all that right!
>
> Doug

Thanks very much, Doug. I'll give this a shot tonight. This is basically 
what I tried to do, except that I used rsa key instead of dsa, did not 
know about having the public key file unreadable to others, placed it
~/.ssh/authorized_keys directory (is authorized_keys2 in your example a 
plain file?), and didn't use :ext: in the -d option to cvs. I guess 
there's planty here that would have made it not work.:)

Dmitry.

>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>



Re: 1.3 release

Posted by Doug Cutting <cu...@lucene.com>.
Doug Cutting wrote:
> Make sure this file is not 
> readable by others, as otherwise ssh will refuse to use it.

I think it's actually not supposed to be writable: readable is okay. 
The main point is that ssh can be picky about file protections.

Doug


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: 1.3 release

Posted by Doug Cutting <cu...@lucene.com>.
Dmitry Serebrennikov wrote:
> Sounds good. I tried to get some progress on committing last night, but 
> I got bogged down in trying to figuire out ssh. I was just trying to 
> avoid having to type in my password with every cvs command. It seems 
> that ssh is the way to do that, but the one try I had given it last 
> night didn't work.

I use cygwin on Win32 with success.

On your Windows box you need to:

1. Install cygwin.  Be sure to be sure to select the cvs and openssh 
packages when you install, in the "Devel" and "Net" categories, 
respectively.

2. Set some Win32 environment variables.  I do this in System Properties 
 > Advanced > Environment Variables, although you can also do it in 
c:\autoexec.bat, or probably in other places.

Set CVS_RSH = ssh.

If you want to use CVS from tools other than a cygwin shell (e.g., 
Emacs) then also put c:\cygwin\usr\bin on PATH.

3. From a cygwin shell, use 'ssh-keygen -t dsa' to generate a key on 
your Win32 box.  Leave the password empty if you want to not have to 
type one everytime you use CVS.

4. Append the contents of ~/.ssh/id_dsa.pub on your Win32 box to 
cvs.apache.org:~/.ssh/authorized_keys2.  Make sure this file is not 
readable by others, as otherwise ssh will refuse to use it.

5. Try "cvs -d :ext:dmitrys@cvs.apache.org:/home/cvs co jakarta-lucene".

You can also setup Putty to use your cygwin-generated private key.

I hope I got all that right!

Doug


Re: 1.3 release

Posted by Doug Cutting <cu...@lucene.com>.
Dmitry Serebrennikov wrote:
> Sounds good. I tried to get some progress on committing last night, but 
> I got bogged down in trying to figuire out ssh. I was just trying to 
> avoid having to type in my password with every cvs command. It seems 
> that ssh is the way to do that, but the one try I had given it last 
> night didn't work.

I use cygwin on Win32 with success.

On your Windows box you need to:

1. Install cygwin.  Be sure to be sure to select the cvs and openssh 
packages when you install, in the "Devel" and "Net" categories, 
respectively.

2. Set some Win32 environment variables.  I do this in System Properties 
 > Advanced > Environment Variables, although you can also do it in 
c:\autoexec.bat, or probably in other places.

Set CVS_RSH = ssh.

If you want to use CVS from tools other than a cygwin shell (e.g., 
Emacs) then also put c:\cygwin\usr\bin on PATH.

3. From a cygwin shell, use 'ssh-keygen -t dsa' to generate a key on 
your Win32 box.  Leave the password empty if you want to not have to 
type one everytime you use CVS.

4. Append the contents of ~/.ssh/id_dsa.pub on your Win32 box to 
cvs.apache.org:~/.ssh/authorized_keys2.  Make sure this file is not 
readable by others, as otherwise ssh will refuse to use it.

5. Try "cvs -d :ext:dmitrys@cvs.apache.org:/home/cvs co jakarta-lucene".

You can also setup Putty to use your cygwin-generated private key.

I hope I got all that right!

Doug


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: 1.3 release

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Thursday, September 25, 2003, at 02:07  PM, Dmitry Serebrennikov 
wrote:
> Sounds good. I tried to get some progress on committing last night, 
> but I got bogged down in trying to figuire out ssh. I was just trying 
> to avoid having to type in my password with every cvs command. It 
> seems that ssh is the way to do that, but the one try I had given it 
> last night didn't work. I'll try some more today, and if I still can't 
> make it work, I'll go ahead and commit with regular password typing. 
> The instructions on the Apache site seem offuly convoluted for the 
> Windows environment, plus there is no explanation on how to proceed 
> with command line ssh client for windows. I also tried to follow the 
> Unix instructions (generating an RSA key, etc), but that didn't seem 
> to work. What is everyone's favorite way of doing this sort of thing? 
> Any practical suggestions would be appreciated.

To avoid having to type your password, you have to install authorized 
keys on the cvs.apache.org server by generating a public/private key 
pair.  I use Putty as an ssh client on Windows, but do all of my 
committing and development on Mac OS X.  I cannot really help much with 
getting things configured properly on Windows, but there is some 
software (I think its in the Putty family of executables) that you can 
use to configure this stuff.  If you still haven't solved it by 
tomorrow I'll research how I did it once upon a time and report back.

> Also, it would be great, I think, to get more test cases in place 
> before this release goes final. In particular, I'd like to see all 
> test cases run with RAMDirectory as well as an FSDirectory. I may have 
> some time to work on this next week.

Excellent!

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: 1.3 release

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Thursday, September 25, 2003, at 02:07  PM, Dmitry Serebrennikov 
wrote:
> Sounds good. I tried to get some progress on committing last night, 
> but I got bogged down in trying to figuire out ssh. I was just trying 
> to avoid having to type in my password with every cvs command. It 
> seems that ssh is the way to do that, but the one try I had given it 
> last night didn't work. I'll try some more today, and if I still can't 
> make it work, I'll go ahead and commit with regular password typing. 
> The instructions on the Apache site seem offuly convoluted for the 
> Windows environment, plus there is no explanation on how to proceed 
> with command line ssh client for windows. I also tried to follow the 
> Unix instructions (generating an RSA key, etc), but that didn't seem 
> to work. What is everyone's favorite way of doing this sort of thing? 
> Any practical suggestions would be appreciated.

To avoid having to type your password, you have to install authorized 
keys on the cvs.apache.org server by generating a public/private key 
pair.  I use Putty as an ssh client on Windows, but do all of my 
committing and development on Mac OS X.  I cannot really help much with 
getting things configured properly on Windows, but there is some 
software (I think its in the Putty family of executables) that you can 
use to configure this stuff.  If you still haven't solved it by 
tomorrow I'll research how I did it once upon a time and report back.

> Also, it would be great, I think, to get more test cases in place 
> before this release goes final. In particular, I'd like to see all 
> test cases run with RAMDirectory as well as an FSDirectory. I may have 
> some time to work on this next week.

Excellent!

	Erik


Re: 1.3 release

Posted by Dmitry Serebrennikov <dm...@earthlink.net>.
Doug Cutting wrote:

> Erik Hatcher wrote:
>
>> +1 to a 1.3 release.
>
>
> I think we should do another RC as soon as Dmitry's changes are 
> committed.  Then, if no issues pop up in the next week or so, quickly 
> follow it with a final release.  Does that sound like a good plan?
>
> I'm happy to make the releases. 

Sounds good. I tried to get some progress on committing last night, but 
I got bogged down in trying to figuire out ssh. I was just trying to 
avoid having to type in my password with every cvs command. It seems 
that ssh is the way to do that, but the one try I had given it last 
night didn't work. I'll try some more today, and if I still can't make 
it work, I'll go ahead and commit with regular password typing. The 
instructions on the Apache site seem offuly convoluted for the Windows 
environment, plus there is no explanation on how to proceed with command 
line ssh client for windows. I also tried to follow the Unix 
instructions (generating an RSA key, etc), but that didn't seem to work. 
What is everyone's favorite way of doing this sort of thing? Any 
practical suggestions would be appreciated.

Also, it would be great, I think, to get more test cases in place before 
this release goes final. In particular, I'd like to see all test cases 
run with RAMDirectory as well as an FSDirectory. I may have some time to 
work on this next week.

Dmitry.

>
>
> Doug
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>



Re: 1.3 release

Posted by Dmitry Serebrennikov <dm...@earthlink.net>.
Doug Cutting wrote:

> Erik Hatcher wrote:
>
>> +1 to a 1.3 release.
>
>
> I think we should do another RC as soon as Dmitry's changes are 
> committed.  Then, if no issues pop up in the next week or so, quickly 
> follow it with a final release.  Does that sound like a good plan?
>
> I'm happy to make the releases. 

Sounds good. I tried to get some progress on committing last night, but 
I got bogged down in trying to figuire out ssh. I was just trying to 
avoid having to type in my password with every cvs command. It seems 
that ssh is the way to do that, but the one try I had given it last 
night didn't work. I'll try some more today, and if I still can't make 
it work, I'll go ahead and commit with regular password typing. The 
instructions on the Apache site seem offuly convoluted for the Windows 
environment, plus there is no explanation on how to proceed with command 
line ssh client for windows. I also tried to follow the Unix 
instructions (generating an RSA key, etc), but that didn't seem to work. 
What is everyone's favorite way of doing this sort of thing? Any 
practical suggestions would be appreciated.

Also, it would be great, I think, to get more test cases in place before 
this release goes final. In particular, I'd like to see all test cases 
run with RAMDirectory as well as an FSDirectory. I may have some time to 
work on this next week.

Dmitry.

>
>
> Doug
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: 1.3 release

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Sounds like a great plan.  Dmitry is a committer also, right?  But if 
not, let me know and I'll commit them (if I still have them in e-mail - 
always best to submit patches to Bugzilla so they don't get lost in 
e-mail)


On Thursday, September 25, 2003, at 12:05  PM, Doug Cutting wrote:

> Erik Hatcher wrote:
>> +1 to a 1.3 release.
>
> I think we should do another RC as soon as Dmitry's changes are 
> committed.  Then, if no issues pop up in the next week or so, quickly 
> follow it with a final release.  Does that sound like a good plan?
>
> I'm happy to make the releases.
>
> Doug
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: 1.3 release

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Sounds like a great plan.  Dmitry is a committer also, right?  But if 
not, let me know and I'll commit them (if I still have them in e-mail - 
always best to submit patches to Bugzilla so they don't get lost in 
e-mail)


On Thursday, September 25, 2003, at 12:05  PM, Doug Cutting wrote:

> Erik Hatcher wrote:
>> +1 to a 1.3 release.
>
> I think we should do another RC as soon as Dmitry's changes are 
> committed.  Then, if no issues pop up in the next week or so, quickly 
> follow it with a final release.  Does that sound like a good plan?
>
> I'm happy to make the releases.
>
> Doug
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


1.3 release

Posted by Doug Cutting <cu...@lucene.com>.
Erik Hatcher wrote:
> +1 to a 1.3 release.

I think we should do another RC as soon as Dmitry's changes are 
committed.  Then, if no issues pop up in the next week or so, quickly 
follow it with a final release.  Does that sound like a good plan?

I'm happy to make the releases.

Doug


1.3 release

Posted by Doug Cutting <cu...@lucene.com>.
Erik Hatcher wrote:
> +1 to a 1.3 release.

I think we should do another RC as soon as Dmitry's changes are 
committed.  Then, if no issues pop up in the next week or so, quickly 
follow it with a final release.  Does that sound like a good plan?

I'm happy to make the releases.

Doug


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588), again

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
+1 to a 1.3 release.


On Wednesday, September 24, 2003, at 12:54  PM, petite_abeille wrote:

> Hello,
>
> On Wednesday, Sep 24, 2003, at 18:13 Europe/Amsterdam, Doug Cutting 
> wrote:
>
>>> What about larger changes like the file handles? (Assuming that my 
>>> commit access still works).
>>
>> I think it is best to preview these, as you've done.
>>
>> I'm +1 on the file handle change.
>
> This is very good news indeed... ZOE is already "Dmitry powered" :)
>
> Now... considering all the recent flood of high quality submissions... 
> would it not be time for a bold 1.3 release? Or at least an official 
> release candidate which would give more exposure to all those 
> improvements? The last official RC is dated March 2003...
>
> Thanks.
>
> Cheers,
>
> PA.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588), again

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
+1 to a 1.3 release.


On Wednesday, September 24, 2003, at 12:54  PM, petite_abeille wrote:

> Hello,
>
> On Wednesday, Sep 24, 2003, at 18:13 Europe/Amsterdam, Doug Cutting 
> wrote:
>
>>> What about larger changes like the file handles? (Assuming that my 
>>> commit access still works).
>>
>> I think it is best to preview these, as you've done.
>>
>> I'm +1 on the file handle change.
>
> This is very good news indeed... ZOE is already "Dmitry powered" :)
>
> Now... considering all the recent flood of high quality submissions... 
> would it not be time for a bold 1.3 release? Or at least an official 
> release candidate which would give more exposure to all those 
> improvements? The last official RC is dated March 2003...
>
> Thanks.
>
> Cheers,
>
> PA.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588), again

Posted by petite_abeille <pe...@mac.com>.
Hello,

On Wednesday, Sep 24, 2003, at 18:13 Europe/Amsterdam, Doug Cutting 
wrote:

>> What about larger changes like the file handles? (Assuming that my 
>> commit access still works).
>
> I think it is best to preview these, as you've done.
>
> I'm +1 on the file handle change.

This is very good news indeed... ZOE is already "Dmitry powered" :)

Now... considering all the recent flood of high quality submissions... 
would it not be time for a bold 1.3 release? Or at least an official 
release candidate which would give more exposure to all those 
improvements? The last official RC is dated March 2003...

Thanks.

Cheers,

PA.


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588), again

Posted by petite_abeille <pe...@mac.com>.
Hello,

On Wednesday, Sep 24, 2003, at 18:13 Europe/Amsterdam, Doug Cutting 
wrote:

>> What about larger changes like the file handles? (Assuming that my 
>> commit access still works).
>
> I think it is best to preview these, as you've done.
>
> I'm +1 on the file handle change.

This is very good news indeed... ZOE is already "Dmitry powered" :)

Now... considering all the recent flood of high quality submissions... 
would it not be time for a bold 1.3 release? Or at least an official 
release candidate which would give more exposure to all those 
improvements? The last official RC is dated March 2003...

Thanks.

Cheers,

PA.


Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588), again

Posted by Doug Cutting <cu...@lucene.com>.
Dmitry Serebrennikov wrote:
> By the way, what's the policy on commits? Do I need to some +1s before 
> committing fixes like this?

No, I don't think so.

> What about larger changes like the file 
> handles? (Assuming that my commit access still works).

I think it is best to preview these, as you've done.

I'm +1 on the file handle change.

Doug


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588), again

Posted by Doug Cutting <cu...@lucene.com>.
Dmitry Serebrennikov wrote:
> By the way, what's the policy on commits? Do I need to some +1s before 
> committing fixes like this?

No, I don't think so.

> What about larger changes like the file 
> handles? (Assuming that my commit access still works).

I think it is best to preview these, as you've done.

I'm +1 on the file handle change.

Doug


Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588)

Posted by Christoph Goller <go...@detego-software.de>.

Dmitry Serebrennikov schrieb:
> Ok, the patch proposed by Christoph has another problem. It ends up 
> openning IndexReader twice, but closes it only once. This leaves files 
> open that shows up with running TestIndexReader with FSDirectory.
> I's just brackets on the if that were missing. I'm attaching an updated 
> patch and a modified TestIndexReader.java test file. It now has more 
> checks, comments, and a few more test cases.
> 
> By the way, what's the policy on commits? Do I need to some +1s before 
> committing fixes like this? What about larger changes like the file 
> handles? (Assuming that my commit access still works).
> 
> Thanks.
> Dmitry.
> 

Thank you very much, you discovered a stupid bug in my IndexReader patch.
Furthermore, I think you are right about the casual failure of TestIndexReader.
Your patch to RAMDirectory.touchFile(...) seems a good solution.
By the way TestIndexReader with RAMDirectory always succeeds on my hardware
and thanks to your patch it now also works with FSDirectory :-)

Christoph

-- 
*****************************************************************
* Dr. Christoph Goller       Tel.:   +49 89 203 45734           *
* Detego Software GmbH       Mobile: +49 179 1128469            *
* Keuslinstr. 13             Fax.:   +49 721 151516176          *
* 80798 München, Germany     Email:  goller@detego-software.de  *
*****************************************************************


Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588)

Posted by Christoph Goller <go...@detego-software.de>.

Dmitry Serebrennikov schrieb:
> Ok, the patch proposed by Christoph has another problem. It ends up 
> openning IndexReader twice, but closes it only once. This leaves files 
> open that shows up with running TestIndexReader with FSDirectory.
> I's just brackets on the if that were missing. I'm attaching an updated 
> patch and a modified TestIndexReader.java test file. It now has more 
> checks, comments, and a few more test cases.
> 
> By the way, what's the policy on commits? Do I need to some +1s before 
> committing fixes like this? What about larger changes like the file 
> handles? (Assuming that my commit access still works).
> 
> Thanks.
> Dmitry.
> 

Thank you very much, you discovered a stupid bug in my IndexReader patch.
Furthermore, I think you are right about the casual failure of TestIndexReader.
Your patch to RAMDirectory.touchFile(...) seems a good solution.
By the way TestIndexReader with RAMDirectory always succeeds on my hardware
and thanks to your patch it now also works with FSDirectory :-)

Christoph

-- 
*****************************************************************
* Dr. Christoph Goller       Tel.:   +49 89 203 45734           *
* Detego Software GmbH       Mobile: +49 179 1128469            *
* Keuslinstr. 13             Fax.:   +49 721 151516176          *
* 80798 München, Germany     Email:  goller@detego-software.de  *
*****************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588), again

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hello Dmitry,

I just checked Apache's CVS server.  You should be able to commit this
changes to jakarta-lucene repository directly.  If you forgot your
password and need a new one, we can probably ask someone to help us
with that.

I will not apply and commit your patches, so that you can try this
yourself.

As for larger changes, you can also commit them yourself, but the
changes should be discussed on lucene-dev prior to any commits, just
like you've done with your big change from the other day.


Otis

--- Dmitry Serebrennikov <dm...@earthlink.net> wrote:
> Ok, the patch proposed by Christoph has another problem. It ends up 
> openning IndexReader twice, but closes it only once. This leaves
> files 
> open that shows up with running TestIndexReader with FSDirectory.
> I's just brackets on the if that were missing. I'm attaching an
> updated 
> patch and a modified TestIndexReader.java test file. It now has more 
> checks, comments, and a few more test cases.
> 
> By the way, what's the policy on commits? Do I need to some +1s
> before 
> committing fixes like this? What about larger changes like the file 
> handles? (Assuming that my commit access still works).
> 
> Thanks.
> Dmitry.
> 
> 
> 
> 
> > Index: src/java/org/apache/lucene/index/IndexReader.java
> ===================================================================
> RCS file:
>
/home/cvspublic/jakarta-lucene/src/java/org/apache/lucene/index/IndexReader.java,v
> retrieving revision 1.17
> diff -B -u -w -r1.17 IndexReader.java
> --- src/java/org/apache/lucene/index/IndexReader.java	12 Aug 2003
> 15:05:03 -0000	1.17
> +++ src/java/org/apache/lucene/index/IndexReader.java	24 Sep 2003
> 02:21:14 -0000
> @@ -80,11 +80,15 @@
>  public abstract class IndexReader {
>    protected IndexReader(Directory directory) {
>      this.directory = directory;
> +    segmentInfosAge = Long.MAX_VALUE;
>    }
>  
>    Directory directory;
>    private Lock writeLock;
>  
> +  //used to determine whether index has chaged since reader was
> opened
> +  private long segmentInfosAge;
> +  
>    /** Returns an IndexReader reading the index in an FSDirectory in
> the named
>    path. */
>    public static IndexReader open(String path) throws IOException {
> @@ -102,15 +106,21 @@
>      synchronized (directory) {			  // in- & inter-process sync
>        return (IndexReader)new
> Lock.With(directory.makeLock("commit.lock"),
> IndexWriter.COMMIT_LOCK_TIMEOUT) {
>  	  public Object doBody() throws IOException {
> +            IndexReader result = null;
> +            
>  	    SegmentInfos infos = new SegmentInfos();
>  	    infos.read(directory);
> -	    if (infos.size() == 1)		  // index is optimized
> -	      return new SegmentReader(infos.info(0), true);
> -
> +            if (infos.size() == 1) {		  // index is optimized
> +                result = new SegmentReader(infos.info(0), true);
> +            } else {
>  	    SegmentReader[] readers = new SegmentReader[infos.size()];
>  	    for (int i = 0; i < infos.size(); i++)
>  	      readers[i] = new SegmentReader(infos.info(i),
> i==infos.size()-1);
> -	    return new SegmentsReader(directory, readers);
> +                result =  new SegmentsReader(directory, readers);
> +            }
> +        
> +            result.segmentInfosAge = lastModified(directory);
> +            return result;
>  	  }
>  	}.run();
>      }
> @@ -258,6 +268,15 @@
>        if (!writeLock.obtain(IndexWriter.WRITE_LOCK_TIMEOUT)) //
> obtain write lock
>          throw new IOException("Index locked for write: " +
> writeLock);
>        this.writeLock = writeLock;
> +
> +      // we have to check whether index has changed since this
> reader was opened.
> +      // if so, this reader is no longer valid for deletion
> +      if(lastModified(directory) > segmentInfosAge){
> +          this.writeLock.release();
> +          this.writeLock = null;
> +          throw new IOException(
> +            "IndexReader out of date and no longer valid for
> deletion");
> +      }
>      }
>      doDelete(docNum);
>    }
> 

> ATTACHMENT part 3 application/x-javascript name=TestIndexReader.java
> Index: src/java/org/apache/lucene/store/RAMDirectory.java
> ===================================================================
> RCS file:
>
/home/cvspublic/jakarta-lucene/src/java/org/apache/lucene/store/RAMDirectory.java,v
> retrieving revision 1.8
> diff -B -u -w -r1.8 RAMDirectory.java
> --- src/java/org/apache/lucene/store/RAMDirectory.java	1 May 2003
> 19:50:17 -0000	1.8
> +++ src/java/org/apache/lucene/store/RAMDirectory.java	24 Sep 2003
> 02:22:46 -0000
> @@ -146,8 +146,23 @@
>  
>    /** Set the modified time of an existing file to now. */
>    public void touchFile(String name) throws IOException {
> +    final boolean MONITOR = false;
> +    int count = 0;
> +    
>      RAMFile file = (RAMFile)files.get(name);
> -    file.lastModified = System.currentTimeMillis();
> +    long ts2, ts1 = System.currentTimeMillis();
> +    do {
> +        try {
> +            Thread.sleep(0, 1);
> +        } catch (InterruptedException e) {}
> +        ts2 = System.currentTimeMillis();
> +        if (MONITOR) count ++;
> +    } while(ts1 == ts2);
> +    
> +    file.lastModified = ts2;
> +
> +    if (MONITOR)
> +        System.out.println("SLEEP COUNT: " + count);        
>    }
>  
>    /** Returns the length in bytes of a file in the directory. */
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Re: PATCH: IndexReaderDelete (Bugzilla Bug 12588), again

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Hello Dmitry,

I just checked Apache's CVS server.  You should be able to commit this
changes to jakarta-lucene repository directly.  If you forgot your
password and need a new one, we can probably ask someone to help us
with that.

I will not apply and commit your patches, so that you can try this
yourself.

As for larger changes, you can also commit them yourself, but the
changes should be discussed on lucene-dev prior to any commits, just
like you've done with your big change from the other day.


Otis

--- Dmitry Serebrennikov <dm...@earthlink.net> wrote:
> Ok, the patch proposed by Christoph has another problem. It ends up 
> openning IndexReader twice, but closes it only once. This leaves
> files 
> open that shows up with running TestIndexReader with FSDirectory.
> I's just brackets on the if that were missing. I'm attaching an
> updated 
> patch and a modified TestIndexReader.java test file. It now has more 
> checks, comments, and a few more test cases.
> 
> By the way, what's the policy on commits? Do I need to some +1s
> before 
> committing fixes like this? What about larger changes like the file 
> handles? (Assuming that my commit access still works).
> 
> Thanks.
> Dmitry.
> 
> 
> 
> 
> > Index: src/java/org/apache/lucene/index/IndexReader.java
> ===================================================================
> RCS file:
>
/home/cvspublic/jakarta-lucene/src/java/org/apache/lucene/index/IndexReader.java,v
> retrieving revision 1.17
> diff -B -u -w -r1.17 IndexReader.java
> --- src/java/org/apache/lucene/index/IndexReader.java	12 Aug 2003
> 15:05:03 -0000	1.17
> +++ src/java/org/apache/lucene/index/IndexReader.java	24 Sep 2003
> 02:21:14 -0000
> @@ -80,11 +80,15 @@
>  public abstract class IndexReader {
>    protected IndexReader(Directory directory) {
>      this.directory = directory;
> +    segmentInfosAge = Long.MAX_VALUE;
>    }
>  
>    Directory directory;
>    private Lock writeLock;
>  
> +  //used to determine whether index has chaged since reader was
> opened
> +  private long segmentInfosAge;
> +  
>    /** Returns an IndexReader reading the index in an FSDirectory in
> the named
>    path. */
>    public static IndexReader open(String path) throws IOException {
> @@ -102,15 +106,21 @@
>      synchronized (directory) {			  // in- & inter-process sync
>        return (IndexReader)new
> Lock.With(directory.makeLock("commit.lock"),
> IndexWriter.COMMIT_LOCK_TIMEOUT) {
>  	  public Object doBody() throws IOException {
> +            IndexReader result = null;
> +            
>  	    SegmentInfos infos = new SegmentInfos();
>  	    infos.read(directory);
> -	    if (infos.size() == 1)		  // index is optimized
> -	      return new SegmentReader(infos.info(0), true);
> -
> +            if (infos.size() == 1) {		  // index is optimized
> +                result = new SegmentReader(infos.info(0), true);
> +            } else {
>  	    SegmentReader[] readers = new SegmentReader[infos.size()];
>  	    for (int i = 0; i < infos.size(); i++)
>  	      readers[i] = new SegmentReader(infos.info(i),
> i==infos.size()-1);
> -	    return new SegmentsReader(directory, readers);
> +                result =  new SegmentsReader(directory, readers);
> +            }
> +        
> +            result.segmentInfosAge = lastModified(directory);
> +            return result;
>  	  }
>  	}.run();
>      }
> @@ -258,6 +268,15 @@
>        if (!writeLock.obtain(IndexWriter.WRITE_LOCK_TIMEOUT)) //
> obtain write lock
>          throw new IOException("Index locked for write: " +
> writeLock);
>        this.writeLock = writeLock;
> +
> +      // we have to check whether index has changed since this
> reader was opened.
> +      // if so, this reader is no longer valid for deletion
> +      if(lastModified(directory) > segmentInfosAge){
> +          this.writeLock.release();
> +          this.writeLock = null;
> +          throw new IOException(
> +            "IndexReader out of date and no longer valid for
> deletion");
> +      }
>      }
>      doDelete(docNum);
>    }
> 

> ATTACHMENT part 3 application/x-javascript name=TestIndexReader.java
> Index: src/java/org/apache/lucene/store/RAMDirectory.java
> ===================================================================
> RCS file:
>
/home/cvspublic/jakarta-lucene/src/java/org/apache/lucene/store/RAMDirectory.java,v
> retrieving revision 1.8
> diff -B -u -w -r1.8 RAMDirectory.java
> --- src/java/org/apache/lucene/store/RAMDirectory.java	1 May 2003
> 19:50:17 -0000	1.8
> +++ src/java/org/apache/lucene/store/RAMDirectory.java	24 Sep 2003
> 02:22:46 -0000
> @@ -146,8 +146,23 @@
>  
>    /** Set the modified time of an existing file to now. */
>    public void touchFile(String name) throws IOException {
> +    final boolean MONITOR = false;
> +    int count = 0;
> +    
>      RAMFile file = (RAMFile)files.get(name);
> -    file.lastModified = System.currentTimeMillis();
> +    long ts2, ts1 = System.currentTimeMillis();
> +    do {
> +        try {
> +            Thread.sleep(0, 1);
> +        } catch (InterruptedException e) {}
> +        ts2 = System.currentTimeMillis();
> +        if (MONITOR) count ++;
> +    } while(ts1 == ts2);
> +    
> +    file.lastModified = ts2;
> +
> +    if (MONITOR)
> +        System.out.println("SLEEP COUNT: " + count);        
>    }
>  
>    /** Returns the length in bytes of a file in the directory. */
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org