# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: C:\Progetti\NetBeansProjects\incubator\jackrabbit-core-2.4.3\src\main\java\org\apache\jackrabbit\core\journal # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: AbstractJournal.java --- AbstractJournal.java Base (BASE) +++ AbstractJournal.java Locally Modified (Based On LOCAL) @@ -219,7 +219,7 @@ for (;;) { RecordIterator iterator = getRecords(startRevision); long stopRevision = Long.MIN_VALUE; - + boolean onlyThisClusterNode = true; try { while (iterator.hasNext()) { Record record = iterator.nextRecord(); @@ -230,6 +230,7 @@ RecordConsumer consumer = getConsumer(record.getProducerId()); if (consumer != null) { try { + onlyThisClusterNode = false; consumer.consume(record); } catch (IllegalStateException e) { log.error("Could not synchronize to revision: " + record.getRevision() + " due illegal state of RecordConsumer."); @@ -243,7 +244,9 @@ iterator.close(); } - if (stopRevision > 0) { + // only if we read more than a row and the row read is not from this node + if (stopRevision > 0 && stopRevision != startRevision && !onlyThisClusterNode) { + log.debug("Synchronizing to revision " + stopRevision); for (RecordConsumer consumer : consumers.values()) { consumer.setRevision(stopRevision); } @@ -254,6 +257,8 @@ startRevision = stopRevision; continue; } + } else { + log.debug("Skipping revision " + stopRevision + " generated by this node"); } break; }