lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-8296) PendingDeletes shouldn't write to live docs that it shared
Date Sun, 06 May 2018 15:04:00 GMT

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

Simon Willnauer commented on LUCENE-8296:
-----------------------------------------

 I think this is mostly a relict from before I started refactoring ReadersAndUpdates. I would
love to even go further and down the road make the returned Bits instance immutable. I think
we should have a very very simple base class that FixedBitSet can extend that knows how to
read from the array. This way we know nobody ever mutates it. Today you can just cast the
liveDocs from a NRT reader and change it's private instance. I am going to look into this
unless anybody beats me.

One thing that I am feel is missing is an explicit test that the returned bits don't change
in subsequent modifications.

+1 to the change!

 

 

> PendingDeletes shouldn't write to live docs that it shared
> ----------------------------------------------------------
>
>                 Key: LUCENE-8296
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8296
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-8296.patch
>
>
> PendingDeletes has a markAsShared mechanism that allow to make sure that the latest livedocs
are not going to receive more updates. But it is not always used, and I was able to verify
that in some cases we end up with readers whose live docs disagree with the number of deletes.
Even though this might not be causing bugs, it feels dangerous to me so I think we should
consider always marking live docs as shared in #getLiveDocs.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message