update db migration

This commit is contained in:
Luke Pulverenti
2016-02-04 13:04:04 -05:00
parent 7614707dad
commit d28ef71d93
5 changed files with 13 additions and 22 deletions

View File

@@ -67,7 +67,8 @@ namespace MediaBrowser.Server.Implementations.Persistence
{
OnProgress(0);
// Ensure these objects are out of the database.
// Ensure these objects are lazy loaded.
// Without this there is a deadlock that will need to be investigated
var rootChildren = _libraryManager.RootFolder.Children.ToList();
rootChildren = _libraryManager.GetUserRootFolder().Children.ToList();
@@ -182,14 +183,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
progress.Report(100);
}
private void LogMessage(string msg)
{
if (EnableUnavailableMessage)
{
_logger.Info(msg);
}
}
private async Task CleanDeadItems(CancellationToken cancellationToken, IProgress<double> progress)
{
var itemIds = _libraryManager.GetItemIds(new InternalItemsQuery

View File

@@ -583,22 +583,16 @@ namespace MediaBrowser.Server.Implementations.Persistence
CheckDisposed();
_logger.Info("SaveItems waiting on write lock");
await _writeLock.WaitAsync(cancellationToken).ConfigureAwait(false);
IDbTransaction transaction = null;
try
{
_logger.Info("SaveItems creating transaction");
transaction = _connection.BeginTransaction();
foreach (var item in items)
{
_logger.Info("Saving {0}", item.Id);
cancellationToken.ThrowIfCancellationRequested();
var index = 0;