add note on not using totalSize in merge

This commit is contained in:
Shay Banon 2013-02-14 14:30:46 +01:00
parent e8e3dd1c9d
commit c12c456192
2 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,7 @@ public class TrackingConcurrentMergeScheduler extends ConcurrentMergeScheduler {
@Override
protected void doMerge(MergePolicy.OneMerge merge) throws IOException {
int totalNumDocs = merge.totalNumDocs();
// don't used #totalBytesSize() since need to be executed under IW lock, might be fixed in future Lucene version
long totalSizeInBytes = merge.estimatedMergeBytes;
long time = System.currentTimeMillis();
currentMerges.inc();

View File

@ -88,6 +88,7 @@ public class TrackingSerialMergeScheduler extends MergeScheduler {
writer.mergeInit(merge);
int totalNumDocs = merge.totalNumDocs();
// don't used #totalBytesSize() since need to be executed under IW lock, might be fixed in future Lucene version
long totalSizeInBytes = merge.estimatedMergeBytes;
long time = System.currentTimeMillis();
currentMerges.inc();