msokolov commented on PR #12169:
URL: https://github.com/apache/lucene/pull/12169#issuecomment-1520558088

   Thanks for calling this out @jimczi. Yeah, that's true -- the javadoc for 
`HnswGraph` is  incorrect. It says " The graph may be searched by multiple 
threads concurrently, but updates are not thread-safe." but it this class 
doesn't actually provide any searching methods, only some methods for iteration 
that modify internal state, which are clearly not thread-safe.
   
   We might be able to clean up the API to make it clearer what's going on; 
multiple people seem to be getting confused by this. But I agree this change as 
it stands is not usable.
   
   Adding a clone() / copy() method to HnswGraph seems like a fairly 
unobtrusive way to support this. Javadoc definitely needs to be clearer.


-- 
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-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to