mikemccand commented on a change in pull request #1361: LUCENE-8118: Throw 
exception if DWPT grows beyond it's maximum ram limit
URL: https://github.com/apache/lucene-solr/pull/1361#discussion_r395029178
 
 

 ##########
 File path: 
lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java
 ##########
 @@ -219,6 +222,9 @@ final void testPoint(String message) {
   /** Anything that will add N docs to the index should reserve first to
    *  make sure it's allowed. */
   private void reserveOneDoc() {
+    if (numDocsInRAM != 0 && hardMaxBytesPerDWPT < bytesUsed()) { // TODO 
should we check this after each field as well to also preempt within one doc?
+      throw new IllegalArgumentException("RAM used by a single 
DocumentsWriterPerThread can not exceed: " + hardMaxBytesPerDWPT / 1024 / 1024 
+ "MB");
 
 Review comment:
   s/`can not`/`cannot`

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

Reply via email to