From fbd992adc7b18db5e70774d675c160c8c8e2f031 Mon Sep 17 00:00:00 2001 From: David Steele Date: Tue, 29 Aug 2023 13:49:49 -0400 Subject: [PATCH] Allow archive-get command to run when stanza is stopped. The restore command can run while the stanza is stopped so it makes sense for the archive-get command to follow the same rule. The important thing is to ensure that all commands that write to the repository are stopped when the stanza is stopped. --- doc/xml/release.xml | 11 +++++++++++ src/command/archive/get/file.c | 3 --- .../lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm | 3 +-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index e228900e4..1460d9922 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -28,6 +28,17 @@

Multi-stanza check command.

+ + + + + + + + +

Allow archive-get command to run when stanza is stopped.

+
+ diff --git a/src/command/archive/get/file.c b/src/command/archive/get/file.c index 762c698e8..f388e354f 100644 --- a/src/command/archive/get/file.c +++ b/src/command/archive/get/file.c @@ -36,9 +36,6 @@ archiveGetFile( ArchiveGetFileResult result = {.warnList = strLstNew()}; - // Test for stop file - lockStopTest(); - // Check all files in the actual list and return as soon as one is copied bool copied = false; diff --git a/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm b/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm index e220486e3..80d6db911 100644 --- a/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm +++ b/test/lib/pgBackRestTest/Module/Mock/MockArchiveTest.pm @@ -300,8 +300,7 @@ sub run $oHostDbPrimary->executeSimple($strCommandPush . " ${strWalPath}/${strSourceFile}", {iExpectedExitStatus => ERROR_STOP}); - $oHostDbPrimary->executeSimple( - $strCommandGet . " ${strSourceFile1} ${strWalPath}/RECOVERYXLOG", {iExpectedExitStatus => ERROR_STOP}); + $oHostDbPrimary->executeSimple($strCommandGet . " ${strSourceFile1} ${strWalPath}/RECOVERYXLOG"); $oHostDbPrimary->start({strStanza => $oHostDbPrimary->stanza()});