BankSystem icon indicating copy to clipboard operation
BankSystem copied to clipboard

Transaction boundary issue in InternalController.Create()

Open ayende opened this issue 3 years ago • 3 comments

See here:

https://github.com/banksystembg/BankSystem/blob/master/src/Web/BankSystem.Web/Areas/MoneyTransfers/Controllers/InternalController.cs#L97-L127

You have two calls to CreateMoneyTransferAsync(), one to withdraw the money and the other to deposit it. However, they are done as two separate database transactions, which means that you have the option of partial transaction.

ayende avatar Jun 30 '21 12:06 ayende

Hello, @ayende. After reviewing what you said, I've came to the conclusion that you're totally right, unfortunately we don't have time to fix this issue at the moment. Feel free to open a PR if you'd like to help us :)

melikpehlivanov avatar Aug 08 '21 12:08 melikpehlivanov

I actually run into that when using the system to demo Entity Framework Profiler. I used that to showcase how I can find those sort of issues. Thanks for providing the code, it made for a great demo for real world system.

ayende avatar Aug 08 '21 12:08 ayende

Glad to hear that :)

melikpehlivanov avatar Aug 08 '21 12:08 melikpehlivanov