I thought so too
This is our projection:
fromAll()
.when({
$any: function (s, e) {
if (e.metadata && e.metadata.$correlationId) {
linkTo(‘company.corid-’ + e.metadata.$correlationId, e);
}
},
})
``
We add a metadata field “$correlationId” containing a Guid, to all of our events, so whenever a new conversation starts, we create a new stream "company.corid-05c6c7ea-3331-4948-b79a-f2b5ad0d4ce1’ that contains all events of the conversation.
And here is the error log from ES during / after the VM restart (which happend at ~ 9:16:01 UTC).
[PID:06484:025 2014.10.03 09:16:01.518 ERROR MonitoringService ] Error while collecting stats
System.UnauthorizedAccessException: Access to the registry key ‘230’ is denied.
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.InternalGetValue(String name, Object defaultValue, Boolean doNotExpand, Boolean checkSecurity)
at Microsoft.Win32.RegistryKey.GetValue(String name)
at System.Diagnostics.PerformanceMonitor.GetData(String item)
at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item)
at System.Diagnostics.PerformanceCounterLib.GetCategorySample(String machine, String category)
at System.Diagnostics.PerformanceCounter.NextSample()
at System.Diagnostics.PerformanceCounter.NextValue()
at EventStore.Core.Services.Monitoring.SystemStatsHelper.GetPerfCounterInformation(Dictionary2 stats, Int32 count) in c:\EventStore\src\EventStore.Core\Services\Monitoring\SystemStatsHelper.cs:line 123 at EventStore.Core.Services.Monitoring.SystemStatsHelper.GetSystemStats() in c:\EventStore\src\EventStore.Core\Services\Monitoring\SystemStatsHelper.cs:line 42 at EventStore.Core.Services.Monitoring.MonitoringService.CollectStats() in c:\EventStore\src\EventStore.Core\Services\Monitoring\MonitoringService.cs:line 127 [PID:06484:025 2014.10.03 09:16:02.595 ERROR MonitoringService ] Error while collecting stats System.UnauthorizedAccessException: Access to the registry key '230' is denied. at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str) at Microsoft.Win32.RegistryKey.InternalGetValue(String name, Object defaultValue, Boolean doNotExpand, Boolean checkSecurity) at Microsoft.Win32.RegistryKey.GetValue(String name) at System.Diagnostics.PerformanceMonitor.GetData(String item) at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item) at System.Diagnostics.PerformanceCounterLib.GetCategorySample(String machine, String category) at System.Diagnostics.PerformanceCounter.NextSample() at System.Diagnostics.PerformanceCounter.NextValue() at EventStore.Core.Services.Monitoring.SystemStatsHelper.GetPerfCounterInformation(Dictionary
2 stats, Int32 count) in c:\EventStore\src\EventStore.Core\Services\Monitoring\SystemStatsHelper.cs:line 123
at EventStore.Core.Services.Monitoring.SystemStatsHelper.GetSystemStats() in c:\EventStore\src\EventStore.Core\Services\Monitoring\SystemStatsHelper.cs:line 42
at EventStore.Core.Services.Monitoring.MonitoringService.CollectStats() in c:\EventStore\src\EventStore.Core\Services\Monitoring\MonitoringService.cs:line 127
[PID:01548:013 2014.10.03 09:19:07.520 ERROR ProjectionManager ] The ‘$by_correlationId’ projection faulted due to ‘An event emitted in recovery differ from the originally emitted event. Existing(’$>’, ‘C:613381856/P:613381856’). New(’$>’, ‘C:613378130/P:613378130’)’
[PID:01544:014 2014.10.03 09:29:51.094 ERROR ProjectionManager ] The ‘$by_correlationId’ projection faulted due to ‘An event emitted in recovery differ from the originally emitted event. Existing(’$>’, ‘C:615812407/P:615812407’). New(’$>’, ‘C:615809124/P:615809124’)’
[PID:01544:014 2014.10.03 12:05:51.115 ERROR ProjectionManager ] The ‘$by_correlationId’ projection faulted due to ‘An event emitted in recovery differ from the originally emitted event. Existing(’$>’, ‘C:613381856/P:613381856’). New(’$>’, ‘C:613378130/P:613378130’)’
[PID:01788:011 2014.10.03 12:10:17.234 ERROR ProjectionManager ] The ‘$by_correlationId’ projection faulted due to ‘An event emitted in recovery differ from the originally emitted event. Existing(’$>’, ‘C:613381856/P:613381856’). New(’$>’, ‘C:613378130/P:613378130’)’
``
Hope that helps.
Regards
Sebastian