sgup432 commented on PR #16657: URL: https://github.com/apache/lucene/pull/16657#issuecomment-5625728241
> Even with your change as written, if two equal queries happen to land on two different segments, the associated QueryCacheKey objects will reference different instances of the same Query object, which wastes some memory. So replacing with the canonical instance of a Query has some benefit. Even if we reintroduce(it was removed earlier) the uniqueQueries into partition level, I guess we will still have the same problem i.e. same query being held in memory for two different partitions? As the partition number is decided based on the composite key - `(segment, query)` . Until unless we route to partition by queries only, this would avoid us storing the redundant query objects in memory. But the tradeoff being a hot-query segments concentrate in one partition. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
