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/03/04 12:41:08 UTC

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

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


   Hi,
   I agree with Mike. I like the equals() method to be thread safe. That was my original proposal.
   Generally: BytesRefHash is my favourite class if you need a Set<String>. Although it's marked internal, I prefer to use it. Especially if you need a set of millions of strings, this is fast and does not produce millions of Strings. I personally used it only single threaded, but in all cases a method called equals should never ever change state. Sorry!
   
   +1 for the fix
   -1 to add the unmodifiable interface. That's over-engineered.
   
   Uwe
   


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