it's safe to use OneMerge.getTotalBytesSize (fixed in LUCENE-4775)
This commit is contained in:
parent
f23274523a
commit
82aad78ff2
|
@ -89,8 +89,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 totalSizeInBytes = merge.totalBytesSize();
|
||||
long time = System.currentTimeMillis();
|
||||
currentMerges.inc();
|
||||
currentMergesNumDocs.inc(totalNumDocs);
|
||||
|
@ -146,4 +145,4 @@ public class TrackingConcurrentMergeScheduler extends ConcurrentMergeScheduler {
|
|||
// the clone will just be the identity.
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,8 +103,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 totalSizeInBytes = merge.totalBytesSize();
|
||||
long time = System.currentTimeMillis();
|
||||
currentMerges.inc();
|
||||
currentMergesNumDocs.inc(totalNumDocs);
|
||||
|
@ -166,4 +165,4 @@ public class TrackingSerialMergeScheduler extends MergeScheduler {
|
|||
// the clone will just be the identity.
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue