The default mass indexing monitor has this implementationof documentAdded:
@Override
public void documentsAdded(long increment) {
long current = documentsDoneCounter.addAndGet( increment );
if ( current == increment ) {
startTime = System.nanoTime();
}
if ( current % getStatusMessagePeriod() == 0 ) {
printStatusMessage( startTime, totalCounter.longValue(), current );
}
}
The problem is, this implementation will only log something when the number of indexed document is exactly a multiple of getStatusMessagePeriod(). If getStatusMessagePeriod() is 100, and we usually have an increment of 50, but at some point we have an increment of 49 documents for some reason, then we will stop logging from that point until some unusual increment happens again and, by chance, gets us back to a multiple of 100. |