Hard deleting a non existing stream twice returns status 410?

Hi all,

Just realized that hard deleting a non existing stream twice returns a HTTP status 410 the second time.

First call:

curl -i -X DELETE http://127.0.0.1:2113/streams/xyz -H “ES-HardDelete: true”
HTTP/1.1 204 Stream deleted

``

Second call:

curl -i -X DELETE http://127.0.0.1:2113/streams/xyz -H “ES-HardDelete: true”
HTTP/1.1 410 Stream deleted

``

Is this an expected behaviour?

Cheers,

Michael

Yes. The first response tells you it is successful. The second is an error, you are deleting something that is not ‘there’

Ok, tnx.

By the way: As I try to create a kind of “TCK” for the Java event store commons to be compliant with the Event Store, I added this scenario to the Cucumber feature for delete:

https://github.com/fuinorg/event-store-commons/blob/master/test/src/test/resources/features/delete-stream.feature

It’s a nice overview of how the event store behaves in case of deletes.

There is much of this in the test suite here:

https://github.com/EventStore/EventStore/blob/release-v3.5.0/src/EventStore.Core.Tests/Http/Streams/idempotency.cs#L14

There is also a new test suite for http under development which sounds
like it would parallel yours. It is basically being designed as an
executable specification of the protocol.

Cheers,

Greg