Particular / ServiceControl

Backend for ServiceInsight and ServicePulse
https://docs.particular.net/servicecontrol/
Other
52 stars 47 forks source link

The `IndexDisabledException` can prevent SC from starting in maintenance mode #2065

Closed ramonsmits closed 3 years ago

ramonsmits commented 4 years ago

A customer got an IndexDisabledException at the following location which prevented SC from starting.

at ServiceControl.Infrastructure.RavenDB.RavenBootstrapper.PurgeKnownEndpointsWithTemporaryIdsThatAreDuplicate(IDocumentStore documentStore) in C:\BuildAgent\work\7189a56f9f44affc\src\ServiceControl\Infrastructure\RavenDB\RavenBootstrapper.cs:line 103
at ServiceControl.Infrastructure.RavenDB.RavenBootstrapper.StartRaven(EmbeddableDocumentStore documentStore, Settings settings, MarkerFileService markerFileService, Boolean maintenanceMode) in C:\BuildAgent\work\7189a56f9f44affc\src\ServiceControl\Infrastructure\RavenDB\RavenBootstrapper.cs:line 97
at Particular.ServiceControl.MaintenanceBootstrapper.Run(HostArguments args) in C:\BuildAgent\work\7189a56f9f44affc\src\ServiceControl\MaintenanceBootstrapper.cs:line 20

The PurgeKnownEndpointsWithTemporaryIdsThatAreDuplicate method could fail but that should not prevent maintenance mode from launching.

Workaround

Removing the Indexes folder will ensure that maintenance mode can be launched again. It is advised to run to scan for DB consistency by running esentutl /r RVN /l logs /s system in the DB folder.

WilliamBZA commented 3 years ago

Fixed in #2243, released in 4.13.2.