call mergeInit in the serial merge scheduler case to get proper stats for it

This commit is contained in:
Shay Banon 2012-05-02 21:18:31 +03:00
parent e488d524c3
commit 40cd3c239e
1 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,10 @@ public class TrackingSerialMergeScheduler extends MergeScheduler {
if (merge == null) if (merge == null)
break; break;
// different from serial merge, call mergeInit here so we get the correct stats
// mergeInit can be called several times without side affects (checks on merge.info not being null)
writer.mergeInit(merge);
int totalNumDocs = merge.totalNumDocs(); int totalNumDocs = merge.totalNumDocs();
long totalSizeInBytes = merge.totalBytesSize(); long totalSizeInBytes = merge.totalBytesSize();
long time = System.currentTimeMillis(); long time = System.currentTimeMillis();