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] [Commented] (LUCENE-8855) Add Accountable to Query implementations
Date Thu, 20 Jun 2019 07:55:00 GMT

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

Adrien Grand commented on LUCENE-8855:
--------------------------------------

Thanks Andrzej this looks like a better trade-off to me in general. Do we need Accountable
on PointRangeQuery, this one should always be small? I think we should also avoid Accountable
on BytesRef and IntsRef since these objects can be used to represent a slice of an array.
For instance I know in some of places we have collections of BytesRef objects that all share
the same byte[], so counting the underlying byte[] more than once would be incorrect.

In the case of unknown queries I'm wondering whether we should return an arbitrary constant
instead of the shallow size of the object, in order to overestimate memory usage instead of
underestimating it? For the caching use-case I suspect it's better to overestimate memory
usage a bit?

> Add Accountable to Query implementations
> ----------------------------------------
>
>                 Key: LUCENE-8855
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8855
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Andrzej Bialecki 
>            Assignee: Andrzej Bialecki 
>            Priority: Major
>         Attachments: LUCENE-8855.patch, LUCENE-8855.patch, LUCENE-8855.patch
>
>
> Query implementations should also support {{Accountable}} API in order to monitor the
memory consumption e.g. in caches where either keys or values are {{Query}} instances.



--
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


Mime
View raw message