Cannot access streams created by projections in version 3.0.1

ES Version: 3.0.1 Windows

After the update from 3.0.0 to 3.0.1 I cannot access any stream that was created by a projection (system or user projections). When I try to access one of these streams (eg $streams), I get following errors in the ES log:

[PID:11504:009 2014.10.28 17:55:59.971 ERROR QueuedHandlerThreadP] Error while processing message ReadStreamEventsBackward InternalCorrId: f9434083-92e4-46b9-8325-068fdc7b0386, CorrelationId: f9434083-92e4-46b9-8325-068fdc7b0386, EventStreamId: $streams, FromEventNumber: -1, MaxCount: 20, ResolveLinkTos: True, RequireMaster: False, ValidationStreamVersion: in queued handler ‘StorageReaderQueue #1’.

System.Exception: link not in proper format.

at EventStore.Core.Services.Transport.Http.Convert.ToEntry(ResolvedEvent eventLinkPair, Uri requestedUrl, EmbedLevel embedContent, Boolean singleEntry) in c:\EventStore\src\EventStore.Core\Services\Transport\Http\Convert.cs:line 252

at EventStore.Core.Services.Transport.Http.Convert.ToStreamEventBackwardFeed(ReadStreamEventsBackwardCompleted msg, Uri requestedUrl, EmbedLevel embedContent, Boolean headOfStream) in c:\EventStore\src\EventStore.Core\Services\Transport\Http\Convert.cs:line 87

at EventStore.Core.Services.Transport.Http.Format.GetStreamEventsBackward(HttpResponseFormatterArgs entity, Message message, EmbedLevel embed, Boolean headOfStream) in c:\EventStore\src\EventStore.Core\Services\Transport\Http\Format.cs:line 42

at EventStore.Core.Services.Transport.Http.SendToHttpEnvelope.ReplyWith[T](T message) in c:\EventStore\src\EventStore.Core\Services\Transport\Http\SendToHttpEnvelope.cs:line 74

at EventStore.Core.Bus.MessageHandler`1.TryHandle(Message message) in c:\EventStore\src\EventStore.Core\Bus\MessageHandler.cs:line 33

at EventStore.Core.Bus.InMemoryBus.Publish(Message message) in c:\EventStore\src\EventStore.Core\Bus\InMemoryBus.cs:line 336

at EventStore.Core.Bus.QueuedHandlerThreadPool.ReadFromQueue(Object o) in c:\EventStore\src\EventStore.Core\Bus\QueuedHandlerThreadPool.cs:line 106

For now I downgraded to 3.0.0 again and everything works without a problem. Any ideas?

Thanks,

Sebastian

Can you do a read from the stream with resolve linkto false? Would like to see what the link looks like (it’s parsing it and getting an error)

Here a part of $stream when reading without resolving linktos:

{

“title”: “Event stream ‘$streams’”,

“id”: “http://127.0.0.1:2113/streams/%24streams”,

“updated”: “2014-10-28T13:21:36.0935684Z”,

“streamId”: “$streams”,

“author”: {

“name”: “EventStore”

},

“headOfStream”: true,

“selfUrl”: “http://127.0.0.1:2113/streams/%24streams”,

“eTag”: “101162;-2060438500”,

“links”: [

{

“uri”: “http://127.0.0.1:2113/streams/%24streams”,

“relation”: “self”

},

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/head/backward/20”,

“relation”: “first”

},

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/0/forward/20”,

“relation”: “last”

},

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/101142/backward/20”,

“relation”: “next”

},

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/101163/forward/20”,

“relation”: “previous”

},

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/metadata”,

“relation”: “metadata”

}

],

“entries”: [

{

“title”: “101162@$streams”,

“id”: “http://127.0.0.1:2113/streams/%24streams/101162”,

“updated”: “2014-10-28T13:21:36.0935684Z”,

“author”: {

“name”: “EventStore”

},

“summary”: “$>”,

“links”: [

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/101162”,

“relation”: “edit”

},

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/101162”,

“relation”: “alternate”

}

]

},

{

“title”: “101161@$streams”,

“id”: “http://127.0.0.1:2113/streams/%24streams/101161”,

“updated”: “2014-10-28T13:21:35.9531768Z”,

“author”: {

“name”: “EventStore”

},

“summary”: “$>”,

“links”: [

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/101161”,

“relation”: “edit”

},

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/101161”,

“relation”: “alternate”

}

]

},

{

“title”: “101160@$streams”,

“id”: “http://127.0.0.1:2113/streams/%24streams/101160”,

“updated”: “2014-10-28T12:21:36.2614166Z”,

“author”: {

“name”: “EventStore”

},

“summary”: “$>”,

“links”: [

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/101160”,

“relation”: “edit”

},

{

“uri”: “http://127.0.0.1:2113/streams/%24streams/101160”,

“relation”: “alternate”

}

]

},

Regards,

Sebastian

As far as I can see the slice looks good, but whenever I try to resolve the linktos (with $streams?embed=body or $streams?embed=tryharder) I get a 408 “Server was unable to handle request in time”.
When I try to access a specific event in the slice (eg $streams/101160) everything works fine. So it seems that there is a problem in the code that embeds the event data into the slice.

Regards

Sebastian

Can you get the actual event with resolve linktos = fals? I want to see the data in the linkto

Accessing specific event seems to work. When I do not resolve the linkto I get the location of a specific event like “0@streamname” and when I resolve the linkto i get that specific event.

Regards

Sebastian

So the data is 0@streamname correct? Can you copy/paste? It seems parsing it in atom is failing just trying to figure out why.

Code is here btw that is causing the issue https://github.com/EventStore/EventStore/blob/dev/src/EventStore.Core/Services/Transport/Http/Convert.cs#L250

Cheers,

Greg

Ok, I guess I know what the problem is: some streams in our system have the char ‘@’ in the name. For example “[email protected]”.
So I guess if the link data looks like “0@[email protected]” the link can not be resolved as the code explicitly checks if there is exactly one occurence of ‘@’ in the link data.

The following commit changed the control flow, I guess that the problem exists since then: https://github.com/EventStore/EventStore/commit/b16d8b8550e906f139f122b0c8a18e274bc6163a#diff-a537a321e3163b8289656919f71fb28b

Regards,

Sebastian

Ah ok that makes sense I’ll push to only use the first @

https://github.com/EventStore/EventStore/issues/289

https://github.com/EventStore/EventStore/pull/290

Cheers,

Greg

Great, thanks!