You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "stefanvodita (via GitHub)" <gi...@apache.org> on 2024/03/10 08:55:05 UTC

[I] Stop double-checking priority queue inserts [lucene]

stefanvodita opened a new issue, #13175:
URL: https://github.com/apache/lucene/issues/13175

   ### Description
   
   There are several occurrences in our code where we check that an incoming value can be inserted in a priority queue and then call `insertWithOverflow`, which re-does the check. Let's stop checking before calling `insertWithOverflow`.
   
   Credit to @epotyom for [noticing this in `AbstractSortedSetDocValueFacetCounts`](https://github.com/apache/lucene/pull/12966#discussion_r1457584536).


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


Re: [I] Stop double-checking priority queue inserts [lucene]

Posted by "stefanvodita (via GitHub)" <gi...@apache.org>.
stefanvodita commented on issue #13175:
URL: https://github.com/apache/lucene/issues/13175#issuecomment-1987337676

   Maybe we can also extract out a common function from all the `Facets` inserting into a priority queue, as @Shradha26 [suggests](https://github.com/apache/lucene/pull/12966#discussion_r1452555874).


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


Re: [I] Stop double-checking priority queue inserts [lucene]

Posted by "mikemccand (via GitHub)" <gi...@apache.org>.
mikemccand closed issue #13175: Stop double-checking priority queue inserts
URL: https://github.com/apache/lucene/issues/13175


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


Re: [I] Stop double-checking priority queue inserts [lucene]

Posted by "slow-J (via GitHub)" <gi...@apache.org>.
slow-J commented on issue #13175:
URL: https://github.com/apache/lucene/issues/13175#issuecomment-2167958560

   > Maybe we can also extract out a common function from all the `Facets` inserting into a priority queue, as @Shradha26 [suggests](https://github.com/apache/lucene/pull/12966#discussion_r1452555874).
   
   I can't see a way to do this cleanly since e.g. `StringValueFacetCounts` uses `TopOrdAndIntQueue` while the `TaxonomyFacets` abstract class uses `TopOrdAndNumberQueue` which gets casted to int in `setIncomingValue`. If we refactored this to a util method, we would lose the ability to override `setIncomingValue` in the case of non-int queues.
   
   I'll submit a PR for the issue in the initial description.


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


Re: [I] Stop double-checking priority queue inserts [lucene]

Posted by "mikemccand (via GitHub)" <gi...@apache.org>.
mikemccand closed issue #13175: Stop double-checking priority queue inserts
URL: https://github.com/apache/lucene/issues/13175


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