Closed asfimport closed 10 years ago
Shai Erera (@shaie) (migrated from JIRA)
I see that in Lucene45DVP, all access to addressInstances is guarded, so I think we should guard ramBytesUsed too. Likewise for ordIndexInstances. But when I look at Lucene4DVP, ramBytesUsed is an AtomicLong, and updated whenever a new DV is added ... can't we do the same? 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.
Uwe Schindler (@uschindler) (migrated from JIRA)
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
Shai Erera (@shaie) (migrated from JIRA)
Right. I can create a patch a bit later, unless someone beats me to it...
Shai Erera (@shaie) (migrated from JIRA)
Add AtomicLong ramBytesUsed and compute it whenever a new buffer is added to the maps. I think it's ready!
Adrien Grand (@jpountz) (migrated from JIRA)
+1 to commit
ASF subversion and git services (migrated from JIRA)
Commit 1567954 from @shaie in branch 'dev/trunk' https://svn.apache.org/r1567954
LUCENE-5443: DocValuesProducer.ramBytesUsed throws ConcurrentModificationException
ASF subversion and git services (migrated from JIRA)
Commit 1567960 from @shaie in branch 'dev/branches/branch_4x' https://svn.apache.org/r1567960
LUCENE-5443: DocValuesProducer.ramBytesUsed throws ConcurrentModificationException
Shai Erera (@shaie) (migrated from JIRA)
Committed to trunk and 4x.
this came up in an elasticsearch issue that if you pull #ramBytesUsed() while docvalues are loaded in a seperate thread you see a ConcurrentModificationException here is an example:
Migrated from LUCENE-5443 by Simon Willnauer (@s1monw), resolved Feb 13 2014 Attachments: LUCENE-5443.patch