You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/02/24 17:49:33 UTC

[GitHub] [lucene-solr] rmuir commented on pull request #2429: LUCENE-9791 Allow calling BytesRefHash#find concurrently

rmuir commented on pull request #2429:
URL: https://github.com/apache/lucene-solr/pull/2429#issuecomment-785256914


   > > As a result
   > > it is now possible to call BytesRefHash#find concurrently as long as there are
   > > no concurrent modifications to BytesRefHash instance and it is correctly published.
   > 
   > This feels like a trap waiting for somebody to fall in. I think a better solution would be a pool of buffers and proper concurrency controls around them, but don't know what the performance would look like.
   > 
   > At a minimum, we need to update the method javadoc to explain what is going on and what proper usage looks like.
   
   sorry I don't think it is a trap really. Everything else using this thing is using it in a per-thread way. A lot of lucene works this way, it keeps things fast.
   
   I don't think we should slow down all the correct users and add complex concurrency, just because we have one module abusing it. This would be equivalent to making all java code use HashTable/StringBuffer when most code only needs HashMap/StringBuilder. We could easily slow down important things such as indexing. See my comments on the issue.


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

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