[ https://issues.apache.org/jira/browse/IGNITE-13214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Tupitsyn updated IGNITE-13214: ------------------------------------ Release Note: .NET: Fix TransactionScope behavior with read-only cache operations > .NET different behavior when using TransactionScope and ITransactions.Start > ---------------------------------------------------------------------------- > > Key: IGNITE-13214 > URL: https://issues.apache.org/jira/browse/IGNITE-13214 > Project: Ignite > Issue Type: Bug > Components: platforms > Reporter: Sergey Stronchinskiy > Assignee: Pavel Tupitsyn > Priority: Critical > Labels: .NET, transactions > Fix For: 2.9 > > Time Spent: 1.5h > Remaining Estimate: 0h > > Next code runs fine: > {code:c#} > var barier = new Barrier(2); > var cache = Cache(); > cache.Put(1, 1); > var task = Task.Factory.StartNew(() => > { > var otherCache = Cache(); > barier.SignalAndWait(); > otherCache.Put(1, 10); > barier.SignalAndWait(); > }); > using (var txscp = new > TransactionScope(TransactionScopeOption.Required, new > TransactionOptions{IsolationLevel = IsolationLevel.Serializable})) > { > var before = cache.Get(1); > barier.SignalAndWait(); > barier.SignalAndWait(); > txscp.Complete(); > } > Task.WaitAll(task); > barier.Dispose(); > {code} > When I switch to Ignite transactions I get exception: > {code:c#} > using (var tx = > Transactions.TxStart(TransactionConcurrency.Optimistic, > TransactionIsolation.Serializable)) > { > var before = cache.Get(1); > barier.SignalAndWait(); > barier.SignalAndWait(); > tx.Commit(); > } > {code} > {noformat} > Apache.Ignite.Core.Transactions.TransactionOptimisticException : Failed to > prepare transaction (lock conflict): GridNearTxLocal > [mappings=IgniteTxMappingsImpl [], > {noformat} > _Cache_ is _IIgnite.Cache<int, int>()_ and _Transactions_ is > _IIgnite.GetTransactions()_ -- This message was sent by Atlassian Jira (v8.3.4#803005)