Subscribing to a stream containing links to deleted events crashes StreamSubscriptionActor
See original GitHub issueWhen subscribing with resolveLinkTos=true to a stream that contains event links to events that have been deleted, the StreamSubscriptionActor will terminate with an IllegalArgumentException when the event in question is parsed from the protobuf.
Exception text:
ERROR eventstore.StreamSubscriptionActor - eventstore.CommandNotExpectedException: Expected: ReadStreamEventsCompleted, actual: java.lang.IllegalArgumentException: requirement failed: streamId must not be empty
I can reliably reproduce the exception by writing an event of type “TestType” to a random stream in an ES instance with projections enabled, then deleting said stream and subscribing to “$et-TestType”.
The problem seems to be that EventStore, upon encountering an unresolvable event, will create a ResolvedEvent instance as shown below (excerpt from EventStore.Core/Data/ResolvedEvent.cs):
public static ResolvedEvent ForFailedResolvedLink(EventRecord link, ReadEventResult resolveResult, long? commitPosition = null)
{
return new ResolvedEvent(null, link, commitPosition, resolveResult);
}
The JVM client does not handle this case and just crashes when it encounters a ResolvedEvent that does not, in fact, contain a resolved event.
I would expect the subscription actor to simply ignore any events that are “unresolvable because deleted”, at least when resolveLinkTos is enabled.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Verified to work on our system. Thanks for the quick resolution.
Fixed in v2.2.2