[ https://issues.apache.org/jira/browse/LUCENE-8855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16866445#comment-16866445 ]
Adrien Grand commented on LUCENE-8855: -------------------------------------- Would it be an option to use a visitor that assumes some constant memory usage for the majority of queries (say 1kb to be conservative) and uses Accountable#rambytesUsed for queries that implement Accountable? I agree it is going to produce an estimation that will be less good, but maybe good enough in order to not run out-of-memory because of queries as cache keys? > 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 > > > 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org