You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "sgup432 (via GitHub)" <gi...@apache.org> on 2026/09/11 19:59:38 UTC
Re: [PR] Fix LRUQueryCache hashCode/equals contract and account query RAM once per distinct query [lucene]
sgup432 commented on PR #16657:
URL: https://github.com/apache/lucene/pull/16657#issuecomment-5639940883
@msfroh I have changed the logic. As mentioned above, instead of routing based on `(query, segment)`, I am routing by query only. This simplifies a lot of things. Re-Introduced a `uniqueQueries` map which tracks the canonical representation of the query, also corrected the query bytes calculation.
It has also has a reference count based tracking per query. It is needed as N segments can have the same query now within same partition, and entry from the map is only remove once no segments is referencing the query.
While benchmarking the change and analyzing via JFR, I also saw some small performance optimizations opportunities like avoiding the redundant query hashCode calculation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org