vsop-479 commented on PR #12199:
URL: https://github.com/apache/lucene/pull/12199#issuecomment-1508380027
> DocumentsWriterPerThread getAndLock() {
ensureOpen();
DocumentsWriterPerThread dwpt =
freeList.poll(DocumentsWriterPerThread::tryLock);
if (dwpt != null) {
return dwpt;
}
// newWriter() adds the DWPT to the dwpts set as a side-effect. However it
is not added to
// freeList at this point, it will be added later on once DocumentsWriter
has indexed a
// document into this DWPT and then gives it back to the pool by calling
// #marksAsFreeAndUnlock.
return newWriter();
}
@jpountz Does this change makes more small segments generated than the
synchronized version?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]