Skip to content

Added retry to CompressionUtil.OpenCreate to prevent failures during site export#3965

Merged
mitchelsellers merged 1 commit intodnnsoftware:developfrom
daguiler:bugfix/DNN-42754
Aug 18, 2020
Merged

Added retry to CompressionUtil.OpenCreate to prevent failures during site export#3965
mitchelsellers merged 1 commit intodnnsoftware:developfrom
daguiler:bugfix/DNN-42754

Conversation

@daguiler
Copy link
Copy Markdown
Contributor

@daguiler daguiler commented Aug 7, 2020

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 to CompressionUtil.OpenCreate(string) to prevent such files from being skipped during export.

Note

I'm targetting the release/9.7.0 branch because develop is currently missing some important commits.

  1. if decision is to approve and include this fix in 9.7.0, then this PR can be merged as-is
  2. if decision is to defer to next version, then:
    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

@bdukes bdukes added this to the 9.7.1 milestone Aug 7, 2020
@daguiler daguiler changed the base branch from release/9.7.0 to develop August 11, 2020 15:29
Copy link
Copy Markdown
Contributor

@mitchelsellers mitchelsellers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is similar to how we handle things in the installer so approved!

@mitchelsellers mitchelsellers merged commit 1642e97 into dnnsoftware:develop Aug 18, 2020
@daguiler daguiler deleted the bugfix/DNN-42754 branch August 18, 2020 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Site Export fails in web farms when file replication (DFS) locks the zip packages during the process

3 participants