mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Updated transaction locks to be defered.
This commit is contained in:
@@ -894,10 +894,10 @@ namespace Marr.Data
|
||||
ClosingConnection = null;
|
||||
}
|
||||
|
||||
public void BeginTransaction()
|
||||
public void BeginTransaction(IsolationLevel isolationLevel)
|
||||
{
|
||||
OpenConnection();
|
||||
DbTransaction trans = Command.Connection.BeginTransaction();
|
||||
DbTransaction trans = Command.Connection.BeginTransaction(isolationLevel);
|
||||
Command.Transaction = trans;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Marr.Data
|
||||
|
||||
#region - Connections / Transactions -
|
||||
|
||||
void BeginTransaction();
|
||||
void BeginTransaction(IsolationLevel isolationLevel);
|
||||
void RollBack();
|
||||
void Commit();
|
||||
event EventHandler OpeningConnection;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Marr.Data
|
||||
@@ -54,12 +55,12 @@ namespace Marr.Data
|
||||
}
|
||||
}
|
||||
|
||||
public void BeginTransaction()
|
||||
public void BeginTransaction(IsolationLevel isolationLevel)
|
||||
{
|
||||
// Only allow one transaction to begin
|
||||
if (_transactionCount < 1)
|
||||
{
|
||||
DB.BeginTransaction();
|
||||
DB.BeginTransaction(isolationLevel);
|
||||
}
|
||||
|
||||
_transactionCount++;
|
||||
|
||||
Reference in New Issue
Block a user