From 1f39a34abc65c43a0635403b246168acdef4dbbe Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 17 Jan 2018 10:31:21 -0500 Subject: [PATCH] Move lock release later in exitSafe(). This reduce the chance of a new process starting and acquiring a lock before the old process has exited. --- doc/xml/release.xml | 4 ++++ lib/pgBackRest/Common/Exit.pm | 17 ++++++++------- test/expect/mock-all-001.log | 28 ++++++++++++------------- test/expect/mock-all-002.log | 36 ++++++++++++++++---------------- test/expect/mock-archive-001.log | 4 ++-- test/expect/mock-archive-002.log | 4 ++-- test/expect/mock-stanza-001.log | 8 +++---- test/expect/mock-stanza-002.log | 8 +++---- test/expect/mock-stanza-003.log | 8 +++---- 9 files changed, 61 insertions(+), 56 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index c381c8795..1b2b6fee2 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -85,6 +85,10 @@

Improve error module. Add functions to convert error codes to C errors and handle system errors.

+ +

Move lock release later in exitSafe() to reduce the chance of a new process starting and acquiring a lock before the old process has exited.

+
+

Replace cfgCommandTotal()/cfgOptionTotal() functions with constants. The constants are applicable in more cases and allow the compiler to optimize certain loops more efficiently.

diff --git a/lib/pgBackRest/Common/Exit.pm b/lib/pgBackRest/Common/Exit.pm index 4c958a467..4a5490790 100644 --- a/lib/pgBackRest/Common/Exit.pm +++ b/lib/pgBackRest/Common/Exit.pm @@ -61,14 +61,6 @@ sub exitSafe # Close the remote protocolDestroy(undef, undef, defined($iExitCode) && ($iExitCode == 0 || $iExitCode == 1)); - # Don't fail if the lock can't be released - eval - { - lockRelease(false); - } - # uncoverable branch false - this eval exists only to suppress lock errors so original error will not be lost - or do {}; - # If exit code is not defined then try to get it from the exception if (!defined($iExitCode)) { @@ -97,6 +89,15 @@ sub exitSafe # Log command end commandEnd(defined($oException) || $iExitCode == ERROR_TERM ? $iExitCode : undef, $strSignal); + # Release the lock as late as possible + eval + { + # Don't fail if the lock can't be released (it will be freed by the system though the file will remain) + lockRelease(false); + } + # uncoverable branch false - this eval exists only to suppress lock errors so original error will not be lost + or do {}; + # Log return values if any logDebugReturn ( diff --git a/test/expect/mock-all-001.log b/test/expect/mock-all-001.log index d552e2be8..33c47c6c2 100644 --- a/test/expect/mock-all-001.log +++ b/test/expect/mock-all-001.log @@ -306,8 +306,8 @@ P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: expire command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + supplemental file: [TEST_PATH]/db-master/pgbackrest.conf @@ -454,8 +454,8 @@ P00 INFO: sent term signal to process [PROCESS-ID] P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: stop command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 full backup - abort backup - local (db-master host) @@ -534,9 +534,9 @@ P00 TEST: PgBaCkReStTeSt-BACKUP-START-PgBaCkReStTeSt P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 63, oException = [undef], strSignal = TERM P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 ERROR: [063]: terminated on signal [SIGTERM] P00 INFO: backup command end: terminated on signal [SIGTERM] +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 63 full backup - global stop (db-master host) @@ -555,8 +555,8 @@ P00 ERROR: [062]: stop file exists for all stanzas P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: backup command end: aborted with exception [062] +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 62 stop db stanza (db-master host) @@ -567,8 +567,8 @@ P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = true, bIgnoreExist P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: stop command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 stop db stanza (db-master host) @@ -580,8 +580,8 @@ P00 WARN: stop file already exists for stanza db P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: stop command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 full backup - stanza stop (db-master host) @@ -600,8 +600,8 @@ P00 ERROR: [062]: stop file exists for stanza db P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: backup command end: aborted with exception [062] +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 62 start db stanza (db-master host) @@ -611,8 +611,8 @@ P00 INFO: start command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-mast P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: start command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 start all stanzas (db-master host) @@ -622,8 +622,8 @@ P00 INFO: start command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-mast P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: start command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 start all stanzas (db-master host) @@ -634,8 +634,8 @@ P00 WARN: stop file does not exist P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: start command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 full backup - resume (db-master host) @@ -857,8 +857,8 @@ P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: expire command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + supplemental file: [TEST_PATH]/db-master/pgbackrest.conf @@ -1267,8 +1267,8 @@ P00 DEBUG: Storage::Local->pathSync(): bRecurse = , strPathExp = [TE P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: restore command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf @@ -1813,8 +1813,8 @@ P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: expire command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + supplemental file: [TEST_PATH]/db-master/pgbackrest.conf @@ -2163,8 +2163,8 @@ P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: expire command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + supplemental file: [TEST_PATH]/db-master/pgbackrest.conf diff --git a/test/expect/mock-all-002.log b/test/expect/mock-all-002.log index c122df9e8..f4be956ac 100644 --- a/test/expect/mock-all-002.log +++ b/test/expect/mock-all-002.log @@ -310,8 +310,8 @@ P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: expire command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + supplemental file: [TEST_PATH]/db-master/pgbackrest.conf @@ -475,8 +475,8 @@ P00 INFO: sent term signal to process [PROCESS-ID] P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: stop command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 full backup - abort backup - local (backup host) @@ -581,8 +581,8 @@ P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [obj P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = db P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: backup command end: terminated on signal from child process +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 63 full backup - global stop (backup host) @@ -637,8 +637,8 @@ P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: backup command end: aborted with exception [062] +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 62 stop db stanza (db-master host) @@ -649,8 +649,8 @@ P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = true, bIgnoreExist P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: stop command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 stop db stanza (db-master host) @@ -662,8 +662,8 @@ P00 WARN: stop file already exists for stanza db P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: stop command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 full backup - stanza stop (backup host) @@ -718,8 +718,8 @@ P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: backup command end: aborted with exception [062] +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 62 start db stanza (db-master host) @@ -729,8 +729,8 @@ P00 INFO: start command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: start command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 start all stanzas (db-master host) @@ -740,8 +740,8 @@ P00 INFO: start command begin [BACKREST-VERSION]: --backup-cmd=[BACKREST-BIN] P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: start command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 start all stanzas (db-master host) @@ -752,8 +752,8 @@ P00 WARN: stop file does not exist P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: start command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 stop all stanzas (backup host) @@ -765,8 +765,8 @@ P00 INFO: sent term signal to process [PROCESS-ID] P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: stop command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 full backup - abort backup - remote (backup host) @@ -869,9 +869,9 @@ P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteI P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = db P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 ERROR: [063]: terminated on signal [SIGTERM] P00 INFO: backup command end: terminated on signal [SIGTERM] +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 63 full backup - global stop (backup host) @@ -890,8 +890,8 @@ P00 ERROR: [062]: stop file exists for all stanzas P00 DEBUG: Common::Exit::exitSafe(): iExitCode = [undef], oException = [object], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = false, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: backup command end: aborted with exception [062] +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 62 start all stanzas (backup host) @@ -901,8 +901,8 @@ P00 INFO: start command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/ P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: start command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 full backup - resume (backup host) @@ -1128,8 +1128,8 @@ P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: expire command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + supplemental file: [TEST_PATH]/db-master/pgbackrest.conf @@ -1506,8 +1506,8 @@ P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteId P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: restore command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf @@ -1900,8 +1900,8 @@ P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: expire command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + supplemental file: [TEST_PATH]/db-master/pgbackrest.conf @@ -2280,8 +2280,8 @@ P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: expire command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 + supplemental file: [TEST_PATH]/db-master/pgbackrest.conf diff --git a/test/expect/mock-archive-001.log b/test/expect/mock-archive-001.log index fd0dba60d..e493cc49c 100644 --- a/test/expect/mock-archive-001.log +++ b/test/expect/mock-archive-001.log @@ -107,8 +107,8 @@ P00 INFO: pushed WAL segment 000000010000000100000001 P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-push command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get --log-level-console=debug 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG @@ -150,8 +150,8 @@ P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-get command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push --compress --archive-async --process-max=2 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 diff --git a/test/expect/mock-archive-002.log b/test/expect/mock-archive-002.log index dd21c54b3..47a54879c 100644 --- a/test/expect/mock-archive-002.log +++ b/test/expect/mock-archive-002.log @@ -93,8 +93,8 @@ P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteId P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-push command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get --log-level-console=debug 000000010000000100000001 [TEST_PATH]/db-master/db/base/pg_xlog/RECOVERYXLOG @@ -131,8 +131,8 @@ P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteId P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-get command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-push --compress --archive-async --process-max=2 [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002 diff --git a/test/expect/mock-stanza-001.log b/test/expect/mock-stanza-001.log index 98bdf64fd..93fd3edc9 100644 --- a/test/expect/mock-stanza-001.log +++ b/test/expect/mock-stanza-001.log @@ -217,8 +217,8 @@ P00 INFO: pushed WAL segment 000000010000000100000001 P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-push command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 stanza-create db - fail on archive info file missing from non-empty dir (db-master host) @@ -504,8 +504,8 @@ P00 INFO: pushed WAL segment 000000010000000100000002 P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-push command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 @@ -593,8 +593,8 @@ P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-get command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 @@ -1000,8 +1000,8 @@ P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = true, bIgnoreExist P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: stop command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 stanza-delete db - successfully delete the stanza (db-master host) diff --git a/test/expect/mock-stanza-002.log b/test/expect/mock-stanza-002.log index 1156f99f5..44c5fb6f4 100644 --- a/test/expect/mock-stanza-002.log +++ b/test/expect/mock-stanza-002.log @@ -235,8 +235,8 @@ P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteId P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-push command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 stanza-create db - gunzip fail on forced stanza-create (backup host) @@ -355,8 +355,8 @@ P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteId P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-push command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 @@ -445,8 +445,8 @@ P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteId P00 DEBUG: Protocol::Helper::protocolDestroy: found cached protocol: iRemoteIdx = 1, strRemoteType = backup P00 DEBUG: Protocol::Command::Master->close=>: iExitStatus = 0 P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-get command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 @@ -825,8 +825,8 @@ P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = true, bIgnoreExist P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: stop command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 stanza-delete db - successfully delete the stanza (backup host) diff --git a/test/expect/mock-stanza-003.log b/test/expect/mock-stanza-003.log index ac8309fd0..1944fe2ef 100644 --- a/test/expect/mock-stanza-003.log +++ b/test/expect/mock-stanza-003.log @@ -217,8 +217,8 @@ P00 INFO: pushed WAL segment 000000010000000100000001 P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-push command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 stanza-create db - fail on archive info file missing from non-empty dir (db-master host) @@ -479,8 +479,8 @@ P00 INFO: pushed WAL segment 000000010000000100000002 P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-push command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 @@ -568,8 +568,8 @@ P00 DEBUG: Archive::Get::Get->get=>: iResult = 0 P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: archive-get command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 > [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 @@ -987,8 +987,8 @@ P00 DEBUG: Storage::Local->pathCreate(): bCreateParent = true, bIgnoreExist P00 DEBUG: Common::Exit::exitSafe(): iExitCode = 0, oException = [undef], strSignal = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy(): bComplete = true, iRemoteIdx = [undef], strRemoteType = [undef] P00 DEBUG: Protocol::Helper::protocolDestroy=>: iExitStatus = 0 -P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 INFO: stop command end: completed successfully +P00 DEBUG: Common::Lock::lockRelease(): bFailOnNoLock = false P00 DEBUG: Common::Exit::exitSafe=>: iExitCode = 0 stanza-delete db - successfully delete the stanza (db-master host)