Working on a new utility to administer Event Store and (among other things) delete streams, all via the HTTP API.
Here’s what I noticed. Scroll past the bullet points and code snippet for problems that are occurring.
-
Hard-deleted a stream es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936. It had had a couple test events in it.
-
In the category stream $ce-es4py.test, I now see the following events:
(TL;DR - there is some kind of (I guess) tombstone event first, followed by entries for the original 2 events)
{“title”: “2147483647@es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936”,
“id”: “http://192.168.56.20:2113/streams/es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936/2147483647”,
“updated”: “2017-02-23T00:49:05.071538Z”,
“author”: {
“name”: “EventStore”
},
“summary”: “$>”,
“links”: [
{
“uri”: “http://192.168.56.20:2113/streams/es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936/2147483647”,
“relation”: “edit”
},
{
“uri”: “http://192.168.56.20:2113/streams/es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936/2147483647”,
“relation”: “alternate”
}
]
},
{
“title”: “1@es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936”,
“id”: “http://192.168.56.20:2113/streams/es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936/1”,
“updated”: “2017-02-23T00:49:04.298049Z”,
“author”: {
“name”: “EventStore”
},
“summary”: “$>”,
“links”: [
{
“uri”: “http://192.168.56.20:2113/streams/es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936/1”,
“relation”: “edit”
},
{
“uri”: “http://192.168.56.20:2113/streams/es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936/1”,
“relation”: “alternate”
}
]
},
{
“title”: “0@es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936”,
“id”: “http://192.168.56.20:2113/streams/es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936/0”,
“updated”: “2017-02-23T00:49:04.291014Z”,
“author”: {
“name”: “EventStore”
},
“summary”: “$>”,
“links”: [
{
“uri”: “http://192.168.56.20:2113/streams/es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936/0”,
“relation”: “edit”
},
{
“uri”: “http://192.168.56.20:2113/streams/es4py.test-ffc3b869-b8b3-4fb3-869d-b15c468dd936/0”,
“relation”: “alternate”
}
]
}
``
When I try to follow the hyperlink for any of those three events, I get the 410 Deleted response.
This continued presence of “dead” events in a category stream means that:
- I have to add more safety and filtering logic in my Python client that filters out the dead stuff.
- Running a query or projection on this category stream now fails silently.
Here is a sample query:
fromCategory(‘es4py.test’)
.when({
‘$init’: function(s,e) {
return { count: 0 };
},
‘$any’: function(s,e) {
s.count++;
}
})
``
Just counting up all the events in all streams of this category. But I get zero response from the query when I run it, although the status reads: Completed/Stopped/Writing results
I’m guessing it’s because the query runner is falling down on the 410 responses from the dead events. When I run this query on other categories (with no hard-deleted streams) it works great.
Thoughts?