Deleting Streams and Scavenging

Hi,

Our EventStore Db contains customer data and will soon be required to be able to delete this, deleting just the streams that has one customers data and keeping the rest.

I have experimented using the documentation but the data in deleted streams still seem to be readable from the $all stream.

$all bypasses the index, meaning that it does not check the metadata to determine whether events exist or not. As such, events that have been deleted will still be readable until a scavenge has removed them. Note that there are a number of requirements for a scavenge to successfully remove events, for more information about this, please see the section on Scavenging.

https://eventstore.org/docs/server/deleting-streams-and-events/

After a delete, a deleted event is raised, the events appear to be empty and stream is inaccessible on the EventStore UI.

I then do a scavenge, as above there ‘are a number of requirements for a scavenge to successfully remove events’. I believe it is completing successfully, logs attatched, however the deleted streams data is still present in the $all stream.

Is there anything I am likely missing or doing wrong?

Thanks

scavenge Log.txt (7.77 KB)

Scavenge affects all chunks except for the current one. So that data will disappear once the current chunk completes and a scavenge is run. Chunk size is also configurable.

If you are low volume and do not need the performance but prefer simplicity.

fromAll().

when({

function(s,e) { linkTo(“MyAll”, e);

})

This will use regular reads as such deleted events will immediately disappear from it.

I took another look at this and deleted a stream that had a lot more events, and older; thinking they would likely not all be in the current chunk.

Searching the $all stream for occurrences of the event (same data), there were less than before the delete and scanvenge proving streams had been deleted as expected.

Thanks