Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentDiscoveryLiteService.java
===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentDiscoveryLiteService.java	(revision 1772209)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentDiscoveryLiteService.java	(working copy)
@@ -663,7 +663,7 @@
         // Now from the above it also results that this only wakes up the
         // backgroundWorker if we have any pending 'backlogy instances'
         // otherwise this is a no-op
-        if (info.isExternal()) {
+        if (info.isExternal() || info.isCompacted()) {
             // then ignore this as this is likely an external change
             // note: it could be a compacted change, in which case we should
             // probably still process it - but we have a 5sec fallback
Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/secondary/SecondaryStoreObserver.java
===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/secondary/SecondaryStoreObserver.java	(revision 1772209)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/secondary/SecondaryStoreObserver.java	(working copy)
@@ -92,7 +92,7 @@
             NodeState updatedSecondaryRoot = nodeStore.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
             secondaryObserver.contentChanged(DelegatingDocumentNodeState.wrap(updatedSecondaryRoot, differ));
 
-            TimerStats timer = info.isExternal() ? external : local;
+            TimerStats timer = (info.isExternal() || info.isCompacted()) ? external : local;
             timer.update(w.elapsed(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS);
 
             if (!firstEventProcessed){
Index: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java
===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java	(revision 1772209)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/FilterBuilder.java	(working copy)
@@ -420,7 +420,7 @@
             @Override
             public boolean includeCommit(@Nonnull String sessionId, @CheckForNull CommitInfo info) {
                 return (includeSessionLocal || !isLocal(checkNotNull(sessionId), info))
-                    && (includeClusterExternal || !isExternal(info))
+                    && (includeClusterExternal || !(isExternal(info) || isCompacted(info)))
                     && (includeClusterLocal || isExternal(info));
             }
 
@@ -449,6 +449,10 @@
                 return info.isExternal();
             }
             
+            private boolean isCompacted(CommitInfo info) {
+                return info.isCompacted();
+            }
+            
             @Override
             public EventAggregator getEventAggregator() {
                 return aggregator;
Index: oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/BackgroundObserver.java
===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/BackgroundObserver.java	(revision 1772209)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/BackgroundObserver.java	(working copy)
@@ -247,7 +247,7 @@
                 return size(filter(queue, new Predicate<ContentChange>() {
                     @Override
                     public boolean apply(ContentChange input) {
-                        return !input.info.isExternal();
+                        return !input.info.isExternal() && !input.info.isCompacted();
                     }
                 }));
             }
@@ -257,7 +257,7 @@
                 return size(filter(queue, new Predicate<ContentChange>() {
                     @Override
                     public boolean apply(ContentChange input) {
-                        return input.info.isExternal();
+                        return (input.info.isExternal() || input.info.isCompacted());
                     }
                 }));
             }
@@ -275,7 +275,7 @@
         checkNotNull(root);
         checkNotNull(info);
 
-        if (alwaysCollapseExternalEvents && info.isExternal() && last != null && last.info.isExternal()) {
+        if (alwaysCollapseExternalEvents && (info.isExternal() || info.isCompacted()) && last != null && (last.info.isExternal() || last.info.isCompacted())) {
             // This is an external change. If the previous change was
             // also external, we can drop it from the queue (since external
             // changes in any case can cover multiple commits) to help
@@ -291,7 +291,7 @@
             // If the queue is full, some commits have already been skipped
             // so we need to drop the possible local commit information as
             // only external changes can be merged together to larger chunks.
-            change = new ContentChange(root, CommitInfo.EMPTY_EXTERNAL);
+            change = new ContentChange(root, CommitInfo.EMPTY_COMPACTED);
         } else {
             change = new ContentChange(root, info);
         }
Index: oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/CommitInfo.java
===================================================================
--- oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/CommitInfo.java	(revision 1772209)
+++ oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/CommitInfo.java	(working copy)
@@ -50,7 +50,16 @@
      * metadata is known (or needed) about a commit.
      */
     public static final CommitInfo EMPTY_EXTERNAL =
-            new CommitInfo(OAK_UNKNOWN, OAK_UNKNOWN, Collections.<String, Object>emptyMap(), true);
+            new CommitInfo(OAK_UNKNOWN, OAK_UNKNOWN, Collections.<String, Object>emptyMap(), true, false);
+    
+    /**
+     * Empty commit information object to be used for <b>compacted changed</b>.
+     * Compaction in this context refers to what the BackgroundObserver does to overflow entries.
+     * Besides marking a particular change as compacted it serves as a dummy object
+     * with unknown metadata.
+     */
+    public static final CommitInfo EMPTY_COMPACTED =
+            new CommitInfo(OAK_UNKNOWN, OAK_UNKNOWN, Collections.<String, Object>emptyMap(), false, true);
 
     private final String sessionId;
 
@@ -61,6 +70,8 @@
     private final Map<String, Object> info;
 
     private final boolean external;
+    
+    private final boolean compacted;
 
     /**
      * Creates a commit info for the given session and user.
@@ -81,7 +92,7 @@
      * @param info info map
      */
     public CommitInfo(@Nonnull String sessionId, @Nullable String userId, Map<String, Object> info) {
-        this(sessionId, userId, info, false);
+        this(sessionId, userId, info, false, false);
     }
 
     /**
@@ -91,11 +102,12 @@
      * @param info info map
      * @param external indicates if the commit info is from external change
      */
-    public CommitInfo(@Nonnull String sessionId, @Nullable String userId, Map<String, Object> info, boolean external) {
+    public CommitInfo(@Nonnull String sessionId, @Nullable String userId, Map<String, Object> info, boolean external, boolean compacted) {
         this.sessionId = checkNotNull(sessionId);
         this.userId = (userId == null) ? OAK_UNKNOWN : userId;
         this.info = checkNotNull(info);
         this.external = external;
+        this.compacted = compacted;
     }
 
     /**
@@ -130,6 +142,16 @@
     public boolean isExternal() {
         return external;
     }
+    
+    /**
+     * Return a flag indicating whether this commit info
+     * represents a compacted commit.
+     * 
+     * @return true if commit info represents a compacted commit
+     */
+    public boolean isCompacted() {
+        return compacted;
+    }
 
     /**
 
Index: oak-core/src/test/java/org/apache/jackrabbit/oak/spi/commit/PrefilteringBackgroundObserverTest.java
===================================================================
--- oak-core/src/test/java/org/apache/jackrabbit/oak/spi/commit/PrefilteringBackgroundObserverTest.java	(revision 1772209)
+++ oak-core/src/test/java/org/apache/jackrabbit/oak/spi/commit/PrefilteringBackgroundObserverTest.java	(working copy)
@@ -59,7 +59,7 @@
                     return false;
                 } else if (info == excludingCommitInfo) {
                     return true;
-                } else if (info.isExternal()) {
+                } else if (info.isExternal() || info.isCompacted()) {
                     return false;
                 }
                 throw new IllegalStateException("only supporting include or exclude");
Index: oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventFactory.java
===================================================================
--- oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventFactory.java	(revision 1772209)
+++ oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/observation/EventFactory.java	(working copy)
@@ -64,7 +64,7 @@
 
     EventFactory(NamePathMapper mapper, CommitInfo commitInfo) {
         this.mapper = mapper;
-        if (!commitInfo.isExternal()) {
+        if (!commitInfo.isExternal() && !commitInfo.isCompacted()) {
             this.userID = commitInfo.getUserId();
             Object userData = commitInfo.getInfo().get(USER_DATA);
             this.userData = userData instanceof String ? (String) userData : null;
Index: oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserver.java
===================================================================
--- oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserver.java	(revision 1772209)
+++ oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/hybrid/LocalIndexObserver.java	(working copy)
@@ -40,7 +40,7 @@
 
     @Override
     public void contentChanged(@Nonnull NodeState root, @Nonnull CommitInfo info) {
-        if (info.isExternal()){
+        if (info.isExternal() || info.isCompacted()){
            return;
         }
 
