[
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: [email protected]
For additional commands, e-mail: [email protected]