Issue with Multiple projections emitting to the same stream detected error coming from a "$$*-checkpoint" stream

Hi,

We’re having an issue with one of our projections where the status set to “Faulted (Enabled)” and it stopped emiting to the stream. The error we’re getting is:

Multiple projections emitting to the same stream detected. Stream: ‘$projections-omrecord_recordings_all_projection-omrecord_recordings-1fae1100-2114-4173-bb2f-d592b601e49d-checkpoint’. Last event projection: ‘22’. Emitting projection: ‘24’

In this case, the projections is continuous and is set with emit enabled:

fromCategory(“omrecord_recordings”)

.foreachStream()

.when({

RecordingDiscoveredEvent : function(s,e){

linkTo(“omrecord_recordings_all”, e);

}

})

We tried deleting that input checkpoint stream since it’s related old data from a year ago but that just brings up a new checkpoint stream with an equivalent error.

If we create a new continuous projection emit enabled with the same input but that writes to a new stream, it works perfectly:

fromCategory(“omrecord_recordings”)

.foreachStream()

.when({

RecordingDiscoveredEvent : function(s,e){

linkTo(“omrecord_recordings_test”, e);

}

})

We’re able to reproduce a similar error message by deleting that new projection and then recreating it. The difference here is that the issue comes from an input checkpoint stream and as opposed to the output stream.

The version of Eventstore is 4.0.3.0. We tried upgrading to 4.1.0 and restarting Event Store but it didn’t solve the issue. I’ve included a screenshot of the configuration for that projections

We didn’t change anything related those streams or that projections in at least 6 months and it just gave an error all of a sudden.

Any ideas what’s going on? Is there a way to recover without having to create an new output stream?

Thanks,

Jean-Philippe

Multiple emitted stream detected issue.png

Did you try resetting the stream? Since you deleted the stream I’m not sure if you permanently broke that projector though.

Resetting the *projector (the reset button).

Thanks for the response.

Yes, we tried resetting the projector but it went back to the same error on the checkpoint stream.

When we press reset, it actually alternates between different checkpoints stream in the error. For example:

Multiple projections emitting to the same stream detected. Stream: ‘$projections-omrecord_recordings_all_projection-omrecord_recordings-7b3d2c5f-ff0c-4d2e-90dd-e12bee6690e2-checkpoint’. Last event projection: ‘22’. Emitting projection: ‘24’

or

Multiple projections emitting to the same stream detected. Stream: ‘$projections-omrecord_recordings_all_projection-omrecord_recordings-fb771a53-d69b-4827-b4fc-aa4ef608113a-checkpoint’. Last event projection: ‘22’. Emitting projection: ‘24’

What about other projections in your system? or even regular stream writes? are you sure nothing else is writing to omrecord_recordings_all ?

No, we checked and there’s nothing else writing on omrecord_recordings_all. Also in this case, it looks like the issue is with the checkpoint stream(s) as opposed to the output stream.

One thing that I forgot to mention before because I don’t know if it was related, is that the Event Store backup failed a few times because of disk full errors around the same time before we were able to fix it.

We took a closer look at how we do the backup and we just do what’s recommended of copying the chk files so that shouldn’t have caused an issue.
However, we do run Scavenger at the end of each backup. Could this affect things since it writes a new version of the files?