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

Uwe Schindler commented on LUCENE-5443:
---------------------------------------

bq.  Also, looks like the computation of ramBytesUsed is slightly wrong, as it 
uses Integer.SIZE which is the number of bits in an int, not bytes.

It should use RamUsageEstimator#NUM_BYTES_INT - this constant is 4

> DocValuesProducer#ramBytesUsed throws ConcurrentModificationException
> ---------------------------------------------------------------------
>
>                 Key: LUCENE-5443
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5443
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/codecs
>    Affects Versions: 4.6, 4.6.1, 5.0, 4.7
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>            Priority: Minor
>             Fix For: 5.0, 4.7
>
>
> this came up in an [elasticsearch 
> issue|https://github.com/elasticsearch/elasticsearch/issues/5104] that if you 
> pull _#ramBytesUsed()_ while docvalues are loaded in a seperate thread you 
> see a _ConcurrentModificationException_ here is an example:
> {noformat}
> Caused by: java.util.ConcurrentModificationException
>         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:926)
>         at java.util.HashMap$ValueIterator.next(HashMap.java:954)
>         at 
> org.apache.lucene.codecs.lucene45.Lucene45DocValuesProducer.ramBytesUsed(Lucene45DocValuesProducer.java:291)
>         at 
> org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat$FieldsReader.ramBytesUsed(PerFieldDocValuesFormat.java:308)
>         at 
> org.apache.lucene.index.SegmentDocValues.ramBytesUsed(SegmentDocValues.java:103)
>         at 
> org.apache.lucene.index.SegmentReader.ramBytesUsed(SegmentReader.java:555)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to