dnhatn commented on a change in pull request #1397: LUCENE-9304: Refactor DWPTPool to pool DWPT directly URL: https://github.com/apache/lucene-solr/pull/1397#discussion_r404531138
########## File path: lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java ########## @@ -52,12 +52,19 @@ private int numDocsSinceStalled = 0; // only with assert final AtomicBoolean flushDeletes = new AtomicBoolean(false); private boolean fullFlush = false; + private boolean fullFlushMarkDone = false; // only for assertion that we don't get stale DWPTs from the pool + // The flushQueue is used to concurrently distribute DWPTs that are ready to be flushed ie. when a full flush is in + // progress. This might be triggered by a commit or NRT refresh. The trigger will only walk all eligible DWPTs and + // mark them as flushable putting them in the flushQueue ready for other threads (ie. indexing threads) to help flushing private final Queue<DocumentsWriterPerThread> flushQueue = new LinkedList<>(); // only for safety reasons if a DWPT is close to the RAM limit private final Queue<DocumentsWriterPerThread> blockedFlushes = new LinkedList<>(); + // flushingWriters holds all currently flushing writers. There might be writers in this list that + // are also in the flushQueue which means that writers in teh flushingWriters list are not necessarily Review comment: nit: teh -> the ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org