Skip to content

Prevent the installBlocker lock file to be removed by subsequent requests during Upgrade or Install.#6869

Merged
valadas merged 1 commit into
dnnsoftware:developfrom
dimarobert:install-locker
Dec 19, 2025
Merged

Prevent the installBlocker lock file to be removed by subsequent requests during Upgrade or Install.#6869
valadas merged 1 commit into
dnnsoftware:developfrom
dimarobert:install-locker

Conversation

@dimarobert

@dimarobert dimarobert commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

Fixes #6859

Summary

Uses a cleanupLocker boolean that gets set just before calling RegisterInstallBegining to control whether the locker gets cleaned up by the finally block. This prevents early returning code that is meant for any arbitrary requests made during the installation/upgrade process to remove the lock prematurely.

@bdukes bdukes added this to the 10.2.1 milestone Dec 19, 2025
@dimarobert

dimarobert commented Dec 19, 2025

Copy link
Copy Markdown
Contributor Author

@bdukes I think this could be another solution as well develop...dimarobert:install-locker2

It makes the finally block execute cleanup only if the code exits after the RegisterInstallBegining call.
Eliminates both the slight chance that if an exception in RegisterInstallBegining() happens the locker file will not be cleaned up and the no additional code should be written in the future between the lock and the try code blocks cases.

@bdukes

bdukes commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

@bdukes I think this could be another solution as well develop...dimarobert:install-locker2

It makes the finally block execute cleanup only if the code exits after the RegisterInstallBegining call.

I like that approach a lot better. Can you open a new PR for that branch (or push that commit to this PR's branch)?

@dimarobert

Copy link
Copy Markdown
Contributor Author

@bdukes pushed here

@valadas valadas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome!

@valadas
valadas merged commit f01a97c into dnnsoftware:develop Dec 19, 2025
3 checks passed
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.

[Bug]: Subsequent requests during Upgrade remove the installBlocker lock file.

3 participants