[
https://issues.apache.org/jira/browse/LUCENE-8296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16467842#comment-16467842
]
Adrien Grand commented on LUCENE-8296:
--------------------------------------
bq. I think we should have a very very simple base class that FixedBitSet can
extend that knows how to read from the array.
Because of LUCENE-4892 I'm interested in giving codecs a way to turn mutable
bits into a read-only instance. The live docs impl in LUCENE-4892 wraps a hash
set that is upgraded to a bit set when deleted docs become dense, so this would
help return the wrapped bits and remove an unnecessary layer. I believe it
could help not expose mutable bits with the default codec too.
bq. One thing that I am feel is missing is an explicit test that the returned
bits don't change in subsequent modifications.
The changes to TestPendingDeletes test this. This test deletes a document,
checks that the previously retrieved live docs show the doc as live, then
retrieves live docs again and make sure it is deleted.
> 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: [email protected]
For additional commands, e-mail: [email protected]