Skip to content

Abstract away the Examine commit monitoring#100

Draft
kjac wants to merge 1 commit intomainfrom
feature/index-commit-monitor-for-examine
Draft

Abstract away the Examine commit monitoring#100
kjac wants to merge 1 commit intomainfrom
feature/index-commit-monitor-for-examine

Conversation

@kjac
Copy link
Contributor

@kjac kjac commented Mar 11, 2026

TBD


namespace Umbraco.Cms.Search.Provider.Examine.Services;

internal sealed class IndexCommitMonitor : IIndexCommitMonitor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can tell, this i sort of what is proposed here umbraco/Umbraco-CMS#16546 which links on to here Shazwazza/Examine#372 (comment)

Using the event can be problematic, but depends on the use case and outcome. If this is to just wait for a single commit than its probably ok but if its to wait for a rebuild, then the strategy mentioned in the links would be far better where a final special document/record is indexed after the populators run to indicate that rebuild is complete.

return true;
}

var stopwatch = System.Diagnostics.Stopwatch.StartNew();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This never gets stopped?

return;
}

if (committed is false)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when this occurs? is the expectation that maybe the shadow index will still be healthy? Or that the committing/monitor has failed and this needs to exit?

@@ -20,7 +20,7 @@ public static IUmbracoBuilder AddExamineSearchProviderForTest<TIndex, TDirectory
builder.AddNotificationHandler<MemberSavedNotification, MemberSavedDistributedCacheNotificationHandler>();
builder.AddNotificationHandler<MemberDeletedNotification, MemberDeletedDistributedCacheNotificationHandler>();
builder.AddNotificationHandler<IndexRebuildStartingNotification, ZeroDowntimeRebuildNotificationHandler>();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the expectation that the ZeroDowntimeRebuildNotificationHandler is only for Lucene indexes or for any Examine based index?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants