jimczi commented on a change in pull request #939: LUCENE-9003: Compute 
numDocs() lazily.
URL: https://github.com/apache/lucene-solr/pull/939#discussion_r333599941
 
 

 ##########
 File path: 
lucene/core/src/java/org/apache/lucene/index/BaseCompositeReader.java
 ##########
 @@ -89,7 +88,6 @@ protected BaseCompositeReader(R[] subReaders) throws 
IOException {
 
     this.maxDoc = Math.toIntExact(maxDoc);
     starts[subReaders.length] = this.maxDoc;
-    this.numDocs = Math.toIntExact(numDocs);
 
 Review comment:
   I guess it was done because we didn't always check the maximum number of 
documents allowed in an index but now we have better checks so we can safely 
assume that the sum will not overflow ?

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

Reply via email to