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 Fri, 14 Jun 2019 16:33:00 GMT


Adrien Grand commented on LUCENE-8855:

I had the temptation to make Query implement Accountable a couple times over the past years
but I never liked it as it felt like something that is only really useful in esoteric cases
when memory usage of the cache keys - queries - is not negligible compared to what is being
cached. I'd rather not implement Accountable.

My preference would be to either rely on the existing Weight#isCacheable logic, which disables
caching on large queries (see e.g.
so that queries that are used as cache keys are always small. Or alternatively compute a rough
estimate of the memory usage of queries on top of the Query API by using the query visitor
API and some heuristics.

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