Conversation
|
|
||
| namespace Umbraco.Cms.Search.Provider.Examine.Services; | ||
|
|
||
| internal sealed class IndexCommitMonitor : IIndexCommitMonitor |
There was a problem hiding this comment.
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(); |
| return; | ||
| } | ||
|
|
||
| if (committed is false) |
There was a problem hiding this comment.
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>(); | |||
There was a problem hiding this comment.
Is the expectation that the ZeroDowntimeRebuildNotificationHandler is only for Lucene indexes or for any Examine based index?
TBD