Streams with only link events behaving strangely

I have some streams that consist solely of link events to other streams, but have been experiencing some odd behaviour.

If a catchup subscription is live on the stream, all works as expected. But if I disconnect and then connect a new catchup subscription to the same stream, all of the events are removed is if the stream was deleted.

My code currently doesn’t delete any streams in anyway, so I’m pretty sure the bug isn’t due to something direct I’m doing. Can anyone cast any light on the matter? I’d like to check if there’s anything known that could be causing it as a minimal reproduction could be quite awkward to create.

As an aside, the same code running on an embedded eventstore instance does not appear to trigger this behaviour.



Link events are written to the stream as actual events. What do you
get if you try to actually read the stream (with resolveLinkTos :

As an aside, the same code running on an embedded eventstore instance
does not appear to trigger this behaviour.

ClusterNode uses embedded so this sounds like a red herring.



You’re right, the embedded thing probably is a red herring; I’ve just realised that the test in question drops the subscription but does not close the connection, so it is not actually doing the same thing.

If I view the stream in the UI during the process, I see the events get written during the first subscription; they are still visible when I stopped the subscribing process; and then they disappear when the process is restarted. During the restart the process tries both to catch up on the “link” stream and write some new events to it. The new events do not appear either.

For bonus points, I also lose all events from the $ce- category covering these link streams.

The streams themselves are not deleted - only the events contained in them.


I am pretty sure how you are measuring is the issue, surely we would
have heard about such things in the past.

What do you get just doing a read with resolveLinkTos : false?

What is the actual test you are running?

What version of Event Store are you running?

EventStore version 3.9.0

So, mystery one resolved: writing two links to the same event to a stream breaks the UI - the link target is being used as a key for Angular. The events are still there.

The other issue is probably a bug my side; adding links to these streams should be idempotent, but it looks like my event id generation code is incorrect.

Thanks for your time,