You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jason Rutherglen (JIRA)" <ji...@apache.org> on 2009/06/18 03:22:07 UTC

[jira] Created: (LUCENE-1700) LogMergePolicy.findMergesToExpungeDeletes need to get deletes from the SegmentReader

LogMergePolicy.findMergesToExpungeDeletes need to get deletes from the SegmentReader
------------------------------------------------------------------------------------

                 Key: LUCENE-1700
                 URL: https://issues.apache.org/jira/browse/LUCENE-1700
             Project: Lucene - Java
          Issue Type: Bug
          Components: Index
    Affects Versions: 2.4.1
            Reporter: Jason Rutherglen
            Priority: Trivial
             Fix For: 2.9


With LUCENE-1516, deletes are carried over in the SegmentReaders
which means implementations of
MergePolicy.findMergesToExpungeDeletes (such as LogMergePolicy)
need to obtain deletion info from the SR (instead of from the
SegmentInfo which won't have the information).

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1700) LogMergePolicy.findMergesToExpungeDeletes need to get deletes from the SegmentReader

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

Michael McCandless updated LUCENE-1700:
---------------------------------------

    Attachment: LUCENE-1700.patch

Attached patch.

I added a test case showing it, then took that same approach (from LUCENE-1313) and the test passes.

I also found that with NRT, because the deletions are applied before
building the CFS after flushing, we wind up holding open both the
non-CFS and CFS files on creating the reader.  So, I changed deletions
to flush after the CFS is built.

I plan to commit in a day or two.


> LogMergePolicy.findMergesToExpungeDeletes need to get deletes from the SegmentReader
> ------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1700
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1700
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Assignee: Michael McCandless
>            Priority: Trivial
>             Fix For: 2.9
>
>         Attachments: LUCENE-1700.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> With LUCENE-1516, deletes are carried over in the SegmentReaders
> which means implementations of
> MergePolicy.findMergesToExpungeDeletes (such as LogMergePolicy)
> need to obtain deletion info from the SR (instead of from the
> SegmentInfo which won't have the information).

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-1700) LogMergePolicy.findMergesToExpungeDeletes need to get deletes from the SegmentReader

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

Michael McCandless resolved LUCENE-1700.
----------------------------------------

    Resolution: Fixed

Thanks Jason!

> LogMergePolicy.findMergesToExpungeDeletes need to get deletes from the SegmentReader
> ------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1700
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1700
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Assignee: Michael McCandless
>            Priority: Trivial
>             Fix For: 2.9
>
>         Attachments: LUCENE-1700.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> With LUCENE-1516, deletes are carried over in the SegmentReaders
> which means implementations of
> MergePolicy.findMergesToExpungeDeletes (such as LogMergePolicy)
> need to obtain deletion info from the SR (instead of from the
> SegmentInfo which won't have the information).

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1700) LogMergePolicy.findMergesToExpungeDeletes need to get deletes from the SegmentReader

Posted by "Jason Rutherglen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721024#action_12721024 ] 

Jason Rutherglen commented on LUCENE-1700:
------------------------------------------

Taking a step back, maybe we can solve the package protected
SegmentInfo issue here by creating a new class with the
necessary attributes?

Here's what LUCENE-1313 does:

{code} SegmentReader sr = writer.readerPool.getIfExists(info);
if (info.hasDeletions() || (sr != null && sr.hasDeletions())) {
{code}

Because SegmentInfo is package protected it seems ok to access a
package protected method (or in this case variable) in
IndexWriter.

> LogMergePolicy.findMergesToExpungeDeletes need to get deletes from the SegmentReader
> ------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1700
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1700
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 2.9
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> With LUCENE-1516, deletes are carried over in the SegmentReaders
> which means implementations of
> MergePolicy.findMergesToExpungeDeletes (such as LogMergePolicy)
> need to obtain deletion info from the SR (instead of from the
> SegmentInfo which won't have the information).

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Assigned: (LUCENE-1700) LogMergePolicy.findMergesToExpungeDeletes need to get deletes from the SegmentReader

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

Michael McCandless reassigned LUCENE-1700:
------------------------------------------

    Assignee: Michael McCandless

> LogMergePolicy.findMergesToExpungeDeletes need to get deletes from the SegmentReader
> ------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1700
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1700
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Assignee: Michael McCandless
>            Priority: Trivial
>             Fix For: 2.9
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> With LUCENE-1516, deletes are carried over in the SegmentReaders
> which means implementations of
> MergePolicy.findMergesToExpungeDeletes (such as LogMergePolicy)
> need to obtain deletion info from the SR (instead of from the
> SegmentInfo which won't have the information).

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org