lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aliaksandr Zhuhrou (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3631) Remove write access from SegmentReader and possibly move to separate class or IndexWriter/BufferedDeletes/...
Date Wed, 14 Mar 2012 22:14:40 GMT

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

Aliaksandr Zhuhrou commented on LUCENE-3631:
--------------------------------------------

Yes. I thought on something like that. I see that lucene enforces a write-once policy (as
I understand this needed to support a transactional behaviour). So I think  we may use some
conbination of approach for the LUCENE-3837 and a current segment system where any updates
after commit go to the a new file like we do with segments. And when the docValues will be
read to a memory we will fetch all files and values in a file with higher generation will
override values with same docIds.
Of course it increases even more the total amount of files. And not sure yet how to express
this updates on level of the IndexWriter api. 
                
> Remove write access from SegmentReader and possibly move to separate class or IndexWriter/BufferedDeletes/...
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3631
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3631
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: core/index
>    Affects Versions: 4.0
>            Reporter: Uwe Schindler
>            Assignee: Michael McCandless
>         Attachments: LUCENE-3631-threadlocals.patch, LUCENE-3631.patch, LUCENE-3631.patch
>
>
> After LUCENE-3606 is finished, there are some TODOs:
> SegmentReader still contains (package-private) all delete logic including crazy copyOnWrite
for validDocs Bits. It would be good, if SegmentReader itsself could be read-only like all
other IndexReaders.
> There are two possibilities to do this:
> # the simple one: Subclass SegmentReader and make a RWSegmentReader that is only used
by IndexWriter/BufferedDeletes/... DirectoryReader will only use the read-only SegmentReader.
This would move all TODOs to a separate class. It's reopen/clone method would always create
a RO-SegmentReader (for NRT).
> # Remove all write and commit stuff from SegmentReader completely and move it to IndexWriter's
readerPool (it must be in readerPool as deletions need a not-changing view on an index snapshot).
> Unfortunately the code is so complicated and I have no real experience in those internals
of IndexWriter so I did not want to do it with LUCENE-3606, I just separated the code in SegmentReader
and marked with TODO. Maybe Mike McCandless can help :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message