I have encountered a strange scenario in my use of projections:
I write a FloatDepositMade Event to my Account Aggregate Stream - AccountAggregate-4fd7a2c1fccf46dda72661d668486639 (I have a stream per account)
I have a projection pick this event up and link it to a new stream using linkTo(). The new stream is called AccountBalanceAggregate-4fd7a2c1fccf46dda72661d668486639 (I have a balance stream per account)
I have a second projection which partitions the AccountBalanceAggregate streams using the $ce-AccountBalanceAggregate stream.
This has been working perfectly fine until I reset the projection is step 2 by accident and I now have the following results
- The AccountAggregate-4fd7a2c1fccf46dda72661d668486639 stream has the original event as written in step 1
- The AccountBalanceAggregate-4fd7a2c1fccf46dda72661d668486639 has only one event but its a new event with the old one being truncated and the metadata updated to $tb: 1 accordingly
- The $ce-AccountBalanceAggregate catgegory stream now has 2 events (exactly the same)
The result for me is I am adding 2 x the deposited money into the partition as this is running of the category stream.
I have done multiple resets now and every time the reset is done another copy of the event is written to the $ce-AccountBalanceAggregate stream
Can someone confirm if this is expected behaviour when resetting projections and if there is away I can work around the duplication of the events in my projection from the $ce-AccountBalanceAggregate stream.