question: private void reserveOneDoc ( ) { if ( pendingNumDocs . incrementAndGet ( ) > IndexWriter . getActualMaxDocs ( ) ) { pendingNumDocs . decrementAndGet ( ) ; throw new IllegalArgumentException ( "number of documents in the index cannot exceed " + IndexWriter . getActualMaxDocs ( ) ) ; } }
target:  Anything that will add N docs to the index should reserve first to make sure it's allowed. 