mirror of https://github.com/apache/lucene.git
add verbosity
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1062876 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
047d76bf6a
commit
ff27795666
|
@ -333,7 +333,6 @@ public class IndexWriter implements Closeable {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
IndexReader getReader() throws IOException {
|
IndexReader getReader() throws IOException {
|
||||||
|
|
||||||
ensureOpen();
|
ensureOpen();
|
||||||
|
|
||||||
final long tStart = System.currentTimeMillis();
|
final long tStart = System.currentTimeMillis();
|
||||||
|
@ -1049,8 +1048,9 @@ public class IndexWriter implements Closeable {
|
||||||
private void closeInternal(boolean waitForMerges) throws CorruptIndexException, IOException {
|
private void closeInternal(boolean waitForMerges) throws CorruptIndexException, IOException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (infoStream != null)
|
if (infoStream != null) {
|
||||||
message("now flush at close");
|
message("now flush at close waitForMerges=" + waitForMerges);
|
||||||
|
}
|
||||||
|
|
||||||
docWriter.close();
|
docWriter.close();
|
||||||
|
|
||||||
|
@ -2020,12 +2020,19 @@ public class IndexWriter implements Closeable {
|
||||||
* will have completed once this method completes.</p>
|
* will have completed once this method completes.</p>
|
||||||
*/
|
*/
|
||||||
public synchronized void waitForMerges() {
|
public synchronized void waitForMerges() {
|
||||||
|
if (infoStream != null) {
|
||||||
|
message("waitForMerges");
|
||||||
|
}
|
||||||
while(pendingMerges.size() > 0 || runningMerges.size() > 0) {
|
while(pendingMerges.size() > 0 || runningMerges.size() > 0) {
|
||||||
doWait();
|
doWait();
|
||||||
}
|
}
|
||||||
|
|
||||||
// sanity check
|
// sanity check
|
||||||
assert 0 == mergingSegments.size();
|
assert 0 == mergingSegments.size();
|
||||||
|
|
||||||
|
if (infoStream != null) {
|
||||||
|
message("waitForMerges done");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue