How do you achieve optimistic locking by correlationId in EventStoreDB? As I saw in the documentation revision/version is only supported per stream, and putting correlationId in the stream name is bad practice and should affect memory.
Edit: I'm trying to:
I don't want to perform optimistic locking on entire stream because then the same logic will fail for different correlationId if I do step one at the same time.
This seem to me as common feature of event sourcing that event store should support.
You can indeed only do optimistic concurrency check on stream level ( i.e not on a derived stream created by the system projections)