[
https://issues.apache.org/jira/browse/LUCENE-6239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14317817#comment-14317817
]
Uwe Schindler commented on LUCENE-6239:
---------------------------------------
Hi Dawid,
this was my intention behind the comment about "use constants": Since Java 7,
Unsafe.java exposes most of the "static" stuff as public final static constants
(like ADDRESS_SIZE,...). So theoretically, we could read those constants
without risk. My problem is now more the fact that Unsafe is likely to
disappear in Java 9 (they announced that at FOSDEM several times): "Make your
code free of Unsafe, its will disappear - for sure!".
Of course with the constants alone we cannot measure, as we did before. So I
think we should not bother using Unsafe. I just hope that Java 9 brings the
improvements we hope for, so we can then use "official" Java 9 APIs. For Java 7
and Java 8, I think the above assumptions still hold and are perfectly fine.
The above assumptions may no longer hold when Java 10 (maybe Java 9?) brings
the new Garbage Collector "Shenandoah", because this will add an additional
indirection into the Object header (an additional pointer to the "live" version
of an Object, so they can copy the object and update it concurrently).
> Remove RAMUsageEstimator Unsafe calls
> -------------------------------------
>
> Key: LUCENE-6239
> URL: https://issues.apache.org/jira/browse/LUCENE-6239
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Attachments: LUCENE-6239.patch, LUCENE-6239.patch
>
>
> This is unnecessary risk. We should remove this stuff, it is not needed here.
> We are a search engine, not a ram calculator.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]