You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2010/11/11 08:10:13 UTC

[jira] Created: (LUCENE-2753) IndexReader.listCommits should return a List and not an abstract Collection

IndexReader.listCommits should return a List and not an abstract Collection
---------------------------------------------------------------------------

                 Key: LUCENE-2753
                 URL: https://issues.apache.org/jira/browse/LUCENE-2753
             Project: Lucene - Java
          Issue Type: Improvement
          Components: Index
            Reporter: Shai Erera
            Assignee: Shai Erera
            Priority: Minor
             Fix For: 3.1, 4.0


Spinoff from here: http://www.mail-archive.com/dev@lucene.apache.org/msg07509.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-2753) IndexReader.listCommits should return a List and not an abstract Collection

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931248#action_12931248 ] 

Uwe Schindler commented on LUCENE-2753:
---------------------------------------

We cannot declare both methods :( But backwards does not fail now

> IndexReader.listCommits should return a List and not an abstract Collection
> ---------------------------------------------------------------------------
>
>                 Key: LUCENE-2753
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2753
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2753.patch
>
>
> Spinoff from here: http://www.mail-archive.com/dev@lucene.apache.org/msg07509.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-2753) IndexReader.listCommits should return a List and not an abstract Collection

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930952#action_12930952 ] 

Simon Willnauer commented on LUCENE-2753:
-----------------------------------------

Shai, looks good to me! 

+1 to commit

> IndexReader.listCommits should return a List and not an abstract Collection
> ---------------------------------------------------------------------------
>
>                 Key: LUCENE-2753
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2753
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2753.patch
>
>
> Spinoff from here: http://www.mail-archive.com/dev@lucene.apache.org/msg07509.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (LUCENE-2753) IndexReader.listCommits should return a List and not an abstract Collection

Posted by "Shai Erera (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shai Erera resolved LUCENE-2753.
--------------------------------

    Resolution: Fixed

Committed revision 1034080 + 1034144 (3x). Due to backwards tests failure, I kept the method signature as returning Collection, and only documented the new behavior.
Committed revision 1034140 (trunk).

> IndexReader.listCommits should return a List and not an abstract Collection
> ---------------------------------------------------------------------------
>
>                 Key: LUCENE-2753
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2753
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2753.patch
>
>
> Spinoff from here: http://www.mail-archive.com/dev@lucene.apache.org/msg07509.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-2753) IndexReader.listCommits should return a List and not an abstract Collection

Posted by "Shai Erera (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shai Erera updated LUCENE-2753:
-------------------------------

    Attachment: LUCENE-2753.patch

Patch against 3x:

* Changes listCommits() signature to return a List<IndexCommit>
* DirReader.listCommits() sorts the list in the end.
* Added a test case to TestIndexReader.
* IndexCommit implements Comparable. Removed impl from CommitPoint (which also removed a redundant duplicate 'gen' member).

I did not implement ReaderCommit to support deletes. Obtaining the lock for this purpose does not seem the right way to me ... IndexWriter has a deleteUnusedFiles which the application can use. If the app only does IR.listCommits, then being able to delete is an advantage, but otherwise it will need to mess with LockObtainFail exceptions. Not sure it's worth the efforts.

I believe it is ready to commit. I'll wait a day or two until I commit it. Your comments are welcome.

> IndexReader.listCommits should return a List and not an abstract Collection
> ---------------------------------------------------------------------------
>
>                 Key: LUCENE-2753
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2753
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2753.patch
>
>
> Spinoff from here: http://www.mail-archive.com/dev@lucene.apache.org/msg07509.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-2753) IndexReader.listCommits should return a List and not an abstract Collection

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931208#action_12931208 ] 

Uwe Schindler commented on LUCENE-2753:
---------------------------------------

Java 5 allows covariant return types. Could we not declare both methods in 3.x and deprecate the old one? In trunk we can remove it and only provide List.

> IndexReader.listCommits should return a List and not an abstract Collection
> ---------------------------------------------------------------------------
>
>                 Key: LUCENE-2753
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2753
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2753.patch
>
>
> Spinoff from here: http://www.mail-archive.com/dev@lucene.apache.org/msg07509.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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