Added retry to CompressionUtil.OpenCreate to prevent failures during site export #3965
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3964
Summary
DNN creates the export zip files in App_Data\ExportImport folder, but it does not add all necessary files at once. It closes and re-opens the zip file many times to add additional files. So DFS detects that the zip file is no longer locked and it starts replication. But then DNN attempts to open it again to add more files, and fails. All of this is noticeable only on large sites.
Typically, replication takes just a few seconds, so I used the
RetryableAction
to add a simple retrial mechanism toCompressionUtil.OpenCreate(string)
to prevent such files from being skipped during export.Note
I'm targetting the
release/9.7.0
branch becausedevelop
is currently missing some important commits.a) DO NOT MERGE right now
b) wait until release/9.7.0 is merged into develop
c) change this PR to target develop (it should not give any conflicts)
d) merge