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:
Michael McCandless 2011-01-24 16:56:58 +00:00
parent 047d76bf6a
commit ff27795666
1 changed files with 10 additions and 3 deletions

View File

@ -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");
}
}
/**