Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 28053 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 10354 [details]
Simple code to reproduce bug.
Current implementation of System.Transactions.Transaction class uses only Serializable isolation level and you have not any way to change it.
Even if you use TransactionScope and give required IsolationLevel using TransactionOptions this has no effect (see sample code in attachment).
In my case it causes many concurrent Serializable transactions in PostgreSQL. This DBMS interprates "Serializable isolation level" as "pretend that all transactions run one after other, despite the fact that really they run in parallel. If this utopia for the specific transaction cannot continue - rollback it with serializable error". So almost all my transactions fails, but work perfectly in .Net using READ COMMITTED isolation level.
As I can see in the source code on github, it can be easy fixed. Now class Transaction has parameterless constructor which set Serializable isolation level. This constructor used in TransactionScope class. All fix is to replace it with Transaction(IsolationLevel level) constructor.
But, maybe, it's necessary to consider TransactionOptions.Timeout at the same time.