Skip to content

Commit

Permalink
RavenDB-22585 : fix failing smuggler inter-version test : prevent NRE…
Browse files Browse the repository at this point in the history
… on TimeSeriesDeletedRanges when migrating from old server
  • Loading branch information
aviv committed Jul 7, 2024
1 parent 00f5022 commit 00e67d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Raven.Server/Smuggler/Migration/Importer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 00e67d4

Please sign in to comment.