summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-11-24 13:20:54 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2010-11-24 13:20:54 +0000
commit2e61008fe9ea9166d45b4c44ebc427a79e8e9397 (patch)
treef7fe5110ce424325074a26ea9c4e78081ac88592
parent89e810694694c470eeb49ae30ad96d1063677db5 (diff)
downloadrabbitmq-server-bug23519.tar.gz
Application of M-Qbug23519
-rw-r--r--src/rabbit_upgrade.erl15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/rabbit_upgrade.erl b/src/rabbit_upgrade.erl
index 27f18588..246fbef7 100644
--- a/src/rabbit_upgrade.erl
+++ b/src/rabbit_upgrade.erl
@@ -128,10 +128,11 @@ apply_upgrades(Upgrades) ->
info("Upgrades: ~w to apply~n", [length(Upgrades)]),
case rabbit_mnesia:copy_db(BackupDir) of
ok ->
- %% We need to make the backup after creating the lock file
- %% so that it protects us from trying to overwrite the
- %% backup. Unfortunately this means the lock file exists in
- %% the backup too, which is not intuitive. Remove it.
+ %% We need to make the backup after creating the
+ %% lock file so that it protects us from trying to
+ %% overwrite the backup. Unfortunately this means
+ %% the lock file exists in the backup too, which
+ %% is not intuitive. Remove it.
ok = file:delete(lock_filename(BackupDir)),
info("Upgrades: Mnesia dir backed up to ~p~n", [BackupDir]),
[apply_upgrade(Upgrade) || Upgrade <- Upgrades],
@@ -141,9 +142,9 @@ apply_upgrades(Upgrades) ->
info("Upgrades: Mnesia backup removed~n", []),
ok = file:delete(LockFile);
{error, E} ->
- %% If we can't backup, the upgrade hasn't started hence we
- %% don't need the lockfile since the real mnesia dir is the
- %% good one.
+ %% If we can't backup, the upgrade hasn't started
+ %% hence we don't need the lockfile since the real
+ %% mnesia dir is the good one.
ok = file:delete(LockFile),
exit({could_not_back_up_mnesia_dir, E})
end;