You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/03/19 13:38:56 UTC

[GitHub] [lucene-solr] mikemccand commented on a change in pull request #1361: LUCENE-8118: Throw exception if DWPT grows beyond it's maximum ram limit

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_r395028755
 
 

 ##########
 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?
 
 Review comment:
   Could you reverse the conditional to `bytesUsed() > hardMaxBytesPerDWPT`?  I think it's more quickly readable in that order?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org