mikemccand commented on a change in pull request #688: LUCENE-8813: Ensure we
never apply deletes from a closed DWPTDeleteQueue
URL: https://github.com/apache/lucene-solr/pull/688#discussion_r288153694
##########
File path: lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java
##########
@@ -168,27 +168,28 @@ long updateDocValues(DocValuesUpdate... updates) throws
IOException {
}
private synchronized long
applyDeleteOrUpdate(ToLongFunction<DocumentsWriterDeleteQueue> function) throws
IOException {
- // TODO why is this synchronized?
+ // This method is synchronized to make sure we don't replace the
deleteQueue while applying this update / delete
+ // otherwise we might loose an update / delete if this happens
concurrently to a full flush.
Review comment:
`loose` -> `lose`
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]