lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2468) reopen on NRT reader should share readers w/ unchanged segments
Date Tue, 18 May 2010 09:55:43 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868585#action_12868585
] 

Michael McCandless commented on LUCENE-2468:
--------------------------------------------

Indeed, right now the newly returned NRT reader will always provide a
shallow clone for any segments that have not changed vs the previous
NRT reader.

FieldCache is unaffected by this (it always keys on the "core"
readers, getFieldCacheKey, which is the same for shallow clones) --
such shallow clones will share the same field cache entry.

But other caches (CachingWrapperFilter, CachingSpanFilter) don't use
this key, and so they'll now get multiple entries for the shallow
clones.  So we need to fix that.

However, when new deletions have arrived, a new shallow clone must be
created.  In this case the FieldCache entries are shared.

So, should these other caches share an entry for that clone, or not?
It's tempting to do so -- all that's changed is new docs got deleted,
and any time these filters are applied for searching, they are AND'd
with "not deleted".

But, this is technically shaky ground, since the new deletions will in
fact mean some docs that previously passed the filter (bit was set)
will now have the bit un-set.

I would lean towards letting the caches share the filter in these
cases, and advertising in these classes javadocs that this will
happen.  Thoughts?


> reopen on NRT reader should share readers w/ unchanged segments
> ---------------------------------------------------------------
>
>                 Key: LUCENE-2468
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2468
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Yonik Seeley
>            Assignee: Michael McCandless
>         Attachments: LUCENE-2468.patch
>
>
> A repoen on an NRT reader doesn't seem to share readers for those segments that are unchanged.
> http://search.lucidimagination.com/search/document/9f0335d480d2e637/nrt_and_caching_based_on_indexreader

-- 
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


Mime
View raw message