lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-5700) Add 'accountable' interface for various ramBytesUsed
Date Wed, 28 May 2014 09:49:04 GMT

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

Adrien Grand updated LUCENE-5700:
---------------------------------

    Attachment: LUCENE-5700.patch

Here is a patch:
 - new oal.util.Accountable interface with a ramBytesUsed() method
 - Classes that had a ramBytesUsed/sizeInBytes method to estimate memory usage now implement
this interface
 - Classes that had a sizeInBytes method to compute disk usage remained as-is.

I think the tough question is what to do in case memory usage cannot be computed. Returning
-1 would work but we would need to make sure all consumers of this API handle that case properly...
Since we don't have this issue now (all classes that implement the interface know how to do
it), the documentation specifies that negative values are unsupported. Maybe we'll need to
revisit it in the future in case the problem arises but for now I think that is the simplest
option?

> Add 'accountable' interface for various ramBytesUsed
> ----------------------------------------------------
>
>                 Key: LUCENE-5700
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5700
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-5700.patch
>
>
> Currently this is a disaster. there is ramBytesUsed(), sizeInBytes(), etc etc everywhere,
with zero consistency, little javadocs, and no structure. For example, look at LUCENE-5695,
where we go back and forth on how to handle "don't know". 
> I don't think we should add any more of these methods to any classes in lucene until
this has been cleaned up.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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


Mime
View raw message