msfroh commented on pull request #2088:
URL: https://github.com/apache/lucene-solr/pull/2088#issuecomment-730361695


   > I'm suspicious that this is safe to do. What if another thread is calling 
addDocument at the same time?
   
   As long as `FieldNumbers.clear()` is only called from 
`IndexWriter.deleteAll()`, my understanding is that the safety is provided by 
the `try (Closeable finalizer = docWriter.lockAndAbortAll()) {` block, which (I 
think) guarantees that any concurrent indexing is blocked until the lock is 
released.


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