You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dawid Weiss (JIRA)" <ji...@apache.org> on 2019/01/17 11:28:00 UTC

[jira] [Resolved] (LUCENE-8642) RamUsageTester.sizeOf ignores arrays and collections if --illegal-access=deny

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

Dawid Weiss resolved LUCENE-8642.
---------------------------------
       Resolution: Fixed
    Fix Version/s: master (9.0)

Applied to master and branch_8x and branch_7x as it affects tests only. I changed RamUsageTester to throw runtime exception on denied reflection access (tests didn't catch any problems so far). I also fixed handling of byte buffers there.

> RamUsageTester.sizeOf ignores arrays and collections if --illegal-access=deny
> -----------------------------------------------------------------------------
>
>                 Key: LUCENE-8642
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8642
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Dawid Weiss
>            Assignee: Dawid Weiss
>            Priority: Minor
>             Fix For: master (9.0)
>
>
> We have a silent fall-through on catch clause there if a field is inaccessible. This causes all collections to not be recursively descended into.
> We could hack it so that collection objects are counted "manually". Or we could propagate illegal access exception from ram tester, detect which tests/ objects do try to measure collection objects and either remove them (if it's not possible to measure accurately) or change them (if it is possible to estimate the size in a different way).
> Looking for feedback on this one.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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