Browse Source

Backport pull request #11943 from jellyfin/release-10.9.z

Increase lyrics migration batch size to 5000

Original-merge: 2a3c904a9f3dbad9086052ede59fa03bdc3f7d69

Merged-by: joshuaboniface <joshua@boniface.me>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
Shadowghost 1 năm trước cách đây
mục cha
commit
aeb0aded91

+ 5 - 3
Jellyfin.Server/Migrations/Routines/FixAudioData.cs

@@ -55,8 +55,9 @@ namespace Jellyfin.Server.Migrations.Routines
                 {
                 {
                     try
                     try
                     {
                     {
+                        _logger.LogInformation("Backing up {Library} to {BackupPath}", DbFilename, bakPath);
                         File.Copy(dbPath, bakPath);
                         File.Copy(dbPath, bakPath);
-                        _logger.LogInformation("Library database backed up to {BackupPath}", bakPath);
+                        _logger.LogInformation("{Library} backed up to {BackupPath}", DbFilename, bakPath);
                         break;
                         break;
                     }
                     }
                     catch (Exception ex)
                     catch (Exception ex)
@@ -80,7 +81,7 @@ namespace Jellyfin.Server.Migrations.Routines
                 {
                 {
                     IncludeItemTypes = [BaseItemKind.Audio],
                     IncludeItemTypes = [BaseItemKind.Audio],
                     StartIndex = startIndex,
                     StartIndex = startIndex,
-                    Limit = 100,
+                    Limit = 5000,
                     SkipDeserialization = true
                     SkipDeserialization = true
                 })
                 })
                 .Cast<Audio>()
                 .Cast<Audio>()
@@ -97,7 +98,8 @@ namespace Jellyfin.Server.Migrations.Routines
                 }
                 }
 
 
                 _itemRepository.SaveItems(results, CancellationToken.None);
                 _itemRepository.SaveItems(results, CancellationToken.None);
-                startIndex += 100;
+                startIndex += results.Count;
+                _logger.LogInformation("Backfilled data for {UpdatedRecords} of {TotalRecords} audio records", startIndex, records);
             }
             }
         }
         }
     }
     }