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
|
||||
*/
|
||||
IndexReader getReader() throws IOException {
|
||||
|
||||
ensureOpen();
|
||||
|
||||
final long tStart = System.currentTimeMillis();
|
||||
|
@ -1049,8 +1048,9 @@ public class IndexWriter implements Closeable {
|
|||
private void closeInternal(boolean waitForMerges) throws CorruptIndexException, IOException {
|
||||
|
||||
try {
|
||||
if (infoStream != null)
|
||||
message("now flush at close");
|
||||
if (infoStream != null) {
|
||||
message("now flush at close waitForMerges=" + waitForMerges);
|
||||
}
|
||||
|
||||
docWriter.close();
|
||||
|
||||
|
@ -2020,12 +2020,19 @@ public class IndexWriter implements Closeable {
|
|||
* will have completed once this method completes.</p>
|
||||
*/
|
||||
public synchronized void waitForMerges() {
|
||||
if (infoStream != null) {
|
||||
message("waitForMerges");
|
||||
}
|
||||
while(pendingMerges.size() > 0 || runningMerges.size() > 0) {
|
||||
doWait();
|
||||
}
|
||||
|
||||
// sanity check
|
||||
assert 0 == mergingSegments.size();
|
||||
|
||||
if (infoStream != null) {
|
||||
message("waitForMerges done");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue