From 00e67d49a96a1db40ba87a78a2ed97d332a234ba Mon Sep 17 00:00:00 2001 From: aviv Date: Sun, 7 Jul 2024 15:51:24 +0300 Subject: [PATCH] RavenDB-22585 : fix failing smuggler inter-version test : prevent NRE on TimeSeriesDeletedRanges when migrating from old server --- src/Raven.Server/Smuggler/Migration/Importer.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Raven.Server/Smuggler/Migration/Importer.cs b/src/Raven.Server/Smuggler/Migration/Importer.cs index 043b4a21f45e..af54c6eeebbe 100644 --- a/src/Raven.Server/Smuggler/Migration/Importer.cs +++ b/src/Raven.Server/Smuggler/Migration/Importer.cs @@ -92,6 +92,13 @@ private async Task SaveLastState(long operationId, ImportInfo previousImportInfo smugglerResult.TimeSeries = new SmugglerProgressBase.CountsWithSkippedCountAndLastEtag(); } + if ((_buildVersion >= 4000 && _buildVersion <= 54133) || (_buildVersion >= 6000 && _buildVersion <= 60035)) + { + // prevent NRE, time series deleted ranges were added in 5.4.201 and 6.0.105 + smugglerResult.TimeSeriesDeletedRanges = new SmugglerProgressBase.CountsWithSkippedCountAndLastEtag(); + + } + var importInfo = new ImportInfo { LastEtag = Math.Max(previousImportInfo?.LastEtag ?? 0, smugglerResult.GetLastEtag() + 1),