You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2014/10/22 23:32:33 UTC

[jira] [Updated] (LUCENE-6019) IndexWriter allows to add same field with different docvlaues type

     [ https://issues.apache.org/jira/browse/LUCENE-6019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless updated LUCENE-6019:
---------------------------------------
    Attachment: LUCENE-6019.patch

Patch with new (at first failing) test case, and fix to throw an IllegalArgumentException when the invalid document is added, not at merge time after index is already corrupted.

I also added some missing fail() in TestDocValuesIndexing.

I also turned off test assertions and fixed tests that relied on them, e.g. by upgrading IndexWriter test points to run w/o asserts, and removing some test points.  I put one nocommit about whether the assert we use to verify TokenStream is final should be "real" (I think not?) ...

If the asserts fix is too much here, I can open a separate issue...

> IndexWriter allows to add same field with different docvlaues type 
> -------------------------------------------------------------------
>
>                 Key: LUCENE-6019
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6019
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 4.10.1
>            Reporter: Simon Willnauer
>            Priority: Critical
>             Fix For: 4.10.2, 5.0
>
>         Attachments: LUCENE-6019.patch
>
>
> IndexWriter checks if the DV types are consitent in multiple places but if due to some problems in Elasticsearch users where able to add the same field with different DV types causing merges to fail. Yet I was able to reduce this to a lucene testcase but I was puzzled since it always failed. Yet, I had to run it without assertions and that cause the bug to happen. I can add field foo with BINARY and SORTED_SET causing a merge to fail. Here is a gist https://gist.github.com/s1monw/8707f924b76ba40ee5f3 / https://github.com/elasticsearch/elasticsearch/issues/8009 
> While this is certainly a problem in Elasticsearch Lucene also allows to corrupt an index due to user error which I think should be prevented. NOTE: this only fails if you run without assertions which I think lucene should do in CI once in a while too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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