lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <>
Subject [jira] [Commented] (LUCENE-8855) Add Accountable to Query implementations
Date Thu, 20 Jun 2019 07:55:00 GMT


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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message