mirror of https://github.com/apache/lucene.git
reduce noise to IW's infoStream
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1641477 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c9acce03b8
commit
305a48f3da
|
@ -302,12 +302,6 @@ final class DocumentsWriter implements Closeable, Accountable {
|
|||
}
|
||||
|
||||
boolean anyChanges() {
|
||||
if (infoStream.isEnabled("DW")) {
|
||||
infoStream.message("DW", "anyChanges? numDocsInRam=" + numDocsInRAM.get()
|
||||
+ " deletes=" + anyDeletions() + " hasTickets:"
|
||||
+ ticketQueue.hasTickets() + " pendingChangesInFullFlush: "
|
||||
+ pendingChangesInCurrentFullFlush);
|
||||
}
|
||||
/*
|
||||
* changes are either in a DWPT or in the deleteQueue.
|
||||
* yet if we currently flush deletes and / or dwpt there
|
||||
|
@ -315,7 +309,16 @@ final class DocumentsWriter implements Closeable, Accountable {
|
|||
* before they are published to the IW. ie we need to check if the
|
||||
* ticket queue has any tickets.
|
||||
*/
|
||||
return numDocsInRAM.get() != 0 || anyDeletions() || ticketQueue.hasTickets() || pendingChangesInCurrentFullFlush;
|
||||
boolean anyChanges = numDocsInRAM.get() != 0 || anyDeletions() || ticketQueue.hasTickets() || pendingChangesInCurrentFullFlush;
|
||||
if (infoStream.isEnabled("DW")) {
|
||||
if (anyChanges) {
|
||||
infoStream.message("DW", "anyChanges? numDocsInRam=" + numDocsInRAM.get()
|
||||
+ " deletes=" + anyDeletions() + " hasTickets:"
|
||||
+ ticketQueue.hasTickets() + " pendingChangesInFullFlush: "
|
||||
+ pendingChangesInCurrentFullFlush);
|
||||
}
|
||||
}
|
||||
return anyChanges;
|
||||
}
|
||||
|
||||
public int getBufferedDeleteTermsSize() {
|
||||
|
|
|
@ -4420,10 +4420,13 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
|
|||
synchronized boolean nrtIsCurrent(SegmentInfos infos) {
|
||||
//System.out.println("IW.nrtIsCurrent " + (infos.version == segmentInfos.version && !docWriter.anyChanges() && !bufferedDeletesStream.any()));
|
||||
ensureOpen();
|
||||
boolean isCurrent = infos.version == segmentInfos.version && !docWriter.anyChanges() && !bufferedUpdatesStream.any();
|
||||
if (infoStream.isEnabled("IW")) {
|
||||
infoStream.message("IW", "nrtIsCurrent: infoVersion matches: " + (infos.version == segmentInfos.version) + "; DW changes: " + docWriter.anyChanges() + "; BD changes: "+ bufferedUpdatesStream.any());
|
||||
if (isCurrent == false) {
|
||||
infoStream.message("IW", "nrtIsCurrent: infoVersion matches: " + (infos.version == segmentInfos.version) + "; DW changes: " + docWriter.anyChanges() + "; BD changes: "+ bufferedUpdatesStream.any());
|
||||
}
|
||||
}
|
||||
return infos.version == segmentInfos.version && !docWriter.anyChanges() && !bufferedUpdatesStream.any();
|
||||
return isCurrent;
|
||||
}
|
||||
|
||||
synchronized boolean isClosed() {
|
||||
|
|
Loading…
Reference in New Issue