I’ve just had the strangest experience with the db.
I’ve had an aggregate created with a deterministic guid (read that the algo doesn’t produce real guids though, but it’s always worked fine with ES). The guid was based on the same string every time. As the streams first event’s EventData instance was created, it got the aggregate id as id by accident. So this was my error that eluded me.
As result the event had one id in it’s data, and another in the EventData instance, as it was fed the (deterministic) guid id of the stream.
So, what happened?
A ghost event was appended to the stream. The same event every time. It had a time stamp of 9 days ago (always the exact same time), same id (not related to the ones I had generated above). And even more strange: as aggregate clr headers, and event clr headers, it was the name, not of the event being appended, but of namespaces that I used before (around 9 days ago), but not part of the current solution. I searched every reference in the solution, 100% not present. I changed name of the event. But it was the ghost event that was appended.
This ghost event came back every time, and I deleted the database every time, changed db directory, restarted the computer. Made sure there was one and only one db on the disk, one and only one instance of ES running. The only thing I didn’t do was reinstall ES.
So, the reason there was a problem was my error mentioned above. But the nature of this error was very strange to me. How is ES built? voodoo?