pgbackrest.git / summary / log / commit / refs
commit b6b2c915b24fdcfb64e1fe6a0c8a796da50c9fe4
Author: Cynthia Shang <cynthia.shang@crunchydata.com>
Commit: David Steele <david@pgmasters.net>
Date: Tue Sep 18 15:39:48 2018 +0000
Allow hashSize() to run on remote storage.
Apparently we never needed to run this function remotely.
It will be needed by the backup checksum delta feature, so implement it now.
Contributed by Cynthia Shang.
doc/xml/release.xml | 8 +++++
lib/pgBackRest/Protocol/Helper.pm | 2 ++
lib/pgBackRest/Protocol/Remote/Minion.pm | 1 +
lib/pgBackRest/Protocol/Storage/Remote.pm | 32 +++++++++++++++++++
lib/pgBackRest/Storage/Local.pm | 6 +++-
src/perl/embed.auto.c | 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 ++---
.../Module/Storage/StorageLocalPerlTest.pm | 3 ++
12 files changed, 102 insertions(+), 18 deletions(-)
diff --git a/doc/xml/release.xml b/doc/xml/release.xml
index d16cb822d..e1cc22ab5 100644
--- a/doc/xml/release.xml
+++ b/doc/xml/release.xml
@@ -68,6 +68,14 @@
<p>Add helper for repository storage.</p>
</release-item>
+ <release-item>
+ <release-item-contributor-list>
+ <release-item-contributor id="cynthia.shang"/>
+ </release-item-contributor-list>
+
+ <p>Allow <code>hashSize()</code> to run on remote storage.</p>
+ </release-item>
+
<release-item>
<release-item-contributor-list>
<release-item-contributor id="cynthia.shang"/>
diff --git a/lib/pgBackRest/Protocol/Helper.pm b/lib/pgBackRest/Protocol/Helper.pm
index beb4f812b..f71876b41 100644
--- a/lib/pgBackRest/Protocol/Helper.pm
+++ b/lib/pgBackRest/Protocol/Helper.pm
@@ -55,6 +55,8 @@ use constant OP_STORAGE_CIPHER_PASS_USER => 'storageC
push @EXPORT, qw(OP_STORAGE_CIPHER_PASS_USER);
use constant OP_STORAGE_EXISTS => 'storageExists';
push @EXPORT, qw(OP_STORAGE_EXISTS);
+use constant OP_STORAGE_HASH_SIZE => 'storageHashSize';
+ push @EXPORT, qw(OP_STORAGE_HASH_SIZE);
use constant OP_STORAGE_LIST => 'storageList';
push @EXPORT, qw(OP_STORAGE_LIST);
use constant OP_STORAGE_MANIFEST => 'storageManifest';
diff --git a/lib/pgBackRest/Protocol/Remote/Minion.pm b/lib/pgBackRest/Protocol/Remote/Minion.pm
index 3a7d7a7b9..8415abfe1 100644
--- a/lib/pgBackRest/Protocol/Remote/Minion.pm
+++ b/lib/pgBackRest/Protocol/Remote/Minion.pm
@@ -120,6 +120,7 @@ sub init
&OP_STORAGE_MANIFEST => sub {$oStorage->manifest(@{shift()})},
&OP_STORAGE_MOVE => sub {$oStorage->move(@{shift()})},
&OP_STORAGE_PATH_GET => sub {$oStorage->pathGet(@{shift()})},
+ &OP_STORAGE_HASH_SIZE => sub {$oStorage->hashSize(@{shift()})},
# Info commands
&OP_INFO_STANZA_LIST => sub {$oInfo->stanzaList(@{shift()})},
diff --git a/lib/pgBackRest/Protocol/Storage/Remote.pm b/lib/pgBackRest/Protocol/Storage/Remote.pm
index e693b30bb..64a3bffad 100644
--- a/lib/pgBackRest/Protocol/Storage/Remote.pm
+++ b/lib/pgBackRest/Protocol/Storage/Remote.pm
@@ -80,6 +80,38 @@ sub exists
);
}
+####################################################################################################################################
+# hashSize
+####################################################################################################################################
+sub hashSize
+{
+ my $self = shift;
+
+ # Assign function parameters, defaults, and log debug info
+ my
+ (
+ $strOperation,
+ $strPathExp,
+ $rhParam,
+ ) =
+ logDebugParam
+ (
+ __PACKAGE__ . '->hashSize', \@_,
+ {name => 'strPathExp'},
+ {name => 'rhParam', required => false},
+ );
+
+ my ($strHash, $lSize) = $self->{oProtocol}->cmdExecute(OP_STORAGE_HASH_SIZE, [$strPathExp, $rhParam]);
+
+ # Return from function and log return values if any
+ return logDebugReturn
+ (
+ $strOperation,
+ {name => 'strHash', value => $strHash},
+ {name => 'lSize', value => $lSize}
+ );
+}
+
####################################################################################################################################
# list
####################################################################################################################################
diff --git a/lib/pgBackRest/Storage/Local.pm b/lib/pgBackRest/Storage/Local.pm
index bc953b6a9..196176fb4 100644
--- a/lib/pgBackRest/Storage/Local.pm
+++ b/lib/pgBackRest/Storage/Local.pm
@@ -130,11 +130,13 @@ sub hashSize
(
$strOperation,
$xFileExp,
+ $bIgnoreMissing,
) =
logDebugParam
(
__PACKAGE__ . '->hashSize', \@_,
{name => 'xFileExp'},
+ {name => 'bIgnoreMissing', optional => true, default => false},
);
# Set operation variables
@@ -142,7 +144,9 @@ sub hashSize
my $lSize;
# Is this an IO object or a file expression?
- my $oFileIo = defined($xFileExp) ? (ref($xFileExp) ? $xFileExp : $self->openRead($self->pathGet($xFileExp))) : undef;
+ my $oFileIo =
+ defined($xFileExp) ? (ref($xFileExp) ? $xFileExp :
+ $self->openRead($self->pathGet($xFileExp), {bIgnoreMissing => $bIgnoreMissing})) : undef;
if (defined($oFileIo))
{
diff --git a/src/perl/embed.auto.c b/src/perl/embed.auto.c
index 9782422f7..4f9bedae1 100644
--- a/src/perl/embed.auto.c
+++ b/src/perl/embed.auto.c
@@ -13372,6 +13372,8 @@ static const EmbeddedModule embeddedModule[] =
"push @EXPORT, qw(OP_STORAGE_CIPHER_PASS_USER);\n"
"use constant OP_STORAGE_EXISTS => 'storageExists';\n"
"push @EXPORT, qw(OP_STORAGE_EXISTS);\n"
+ "use constant OP_STORAGE_HASH_SIZE => 'storageHashSize';\n"
+ "push @EXPORT, qw(OP_STORAGE_HASH_SIZE);\n"
"use constant OP_STORAGE_LIST => 'storageList';\n"
"push @EXPORT, qw(OP_STORAGE_LIST);\n"
"use constant OP_STORAGE_MANIFEST => 'storageManifest';\n"
@@ -14597,6 +14599,7 @@ static const EmbeddedModule embeddedModule[] =
"&OP_STORAGE_MANIFEST => sub {$oStorage->manifest(@{shift()})},\n"
"&OP_STORAGE_MOVE => sub {$oStorage->move(@{shift()})},\n"
"&OP_STORAGE_PATH_GET => sub {$oStorage->pathGet(@{shift()})},\n"
+ "&OP_STORAGE_HASH_SIZE => sub {$oStorage->hashSize(@{shift()})},\n"
"\n\n"
"&OP_INFO_STANZA_LIST => sub {$oInfo->stanzaList(@{shift()})},\n"
"\n\n"
@@ -15074,6 +15077,33 @@ static const EmbeddedModule embeddedModule[] =
");\n"
"}\n"
"\n\n\n\n"
+ "sub hashSize\n"
+ "{\n"
+ "my $self = shift;\n"
+ "\n\n"
+ "my\n"
+ "(\n"
+ "$strOperation,\n"
+ "$strPathExp,\n"
+ "$rhParam,\n"
+ ") =\n"
+ "logDebugParam\n"
+ "(\n"
+ "__PACKAGE__ . '->hashSize', \\@_,\n"
+ "{name => 'strPathExp'},\n"
+ "{name => 'rhParam', required => false},\n"
+ ");\n"
+ "\n"
+ "my ($strHash, $lSize) = $self->{oProtocol}->cmdExecute(OP_STORAGE_HASH_SIZE, [$strPathExp, $rhParam]);\n"
+ "\n\n"
+ "return logDebugReturn\n"
+ "(\n"
+ "$strOperation,\n"
+ "{name => 'strHash', value => $strHash},\n"
+ "{name => 'lSize', value => $lSize}\n"
+ ");\n"
+ "}\n"
+ "\n\n\n\n"
"sub list\n"
"{\n"
"my $self = shift;\n"
@@ -18363,17 +18393,21 @@ static const EmbeddedModule embeddedModule[] =
"(\n"
"$strOperation,\n"
"$xFileExp,\n"
+ "$bIgnoreMissing,\n"
") =\n"
"logDebugParam\n"
"(\n"
"__PACKAGE__ . '->hashSize', \\@_,\n"
"{name => 'xFileExp'},\n"
+ "{name => 'bIgnoreMissing', optional => true, default => false},\n"
");\n"
"\n\n"
"my $strHash;\n"
"my $lSize;\n"
"\n\n"
- "my $oFileIo = defined($xFileExp) ? (ref($xFileExp) ? $xFileExp : $self->openRead($self->pathGet($xFileExp))) : undef;\n"
+ "my $oFileIo =\n"
+ "defined($xFileExp) ? (ref($xFileExp) ? $xFileExp :\n"
+ "$self->openRead($self->pathGet($xFileExp), {bIgnoreMissing => $bIgnoreMissing})) : undef;\n"
"\n"
"if (defined($oFileIo))\n"
"{\n"
diff --git a/test/expect/mock-archive-001.log b/test/expect/mock-archive-001.log
index ffc3bf5d9..82a8c2be8 100644
--- a/test/expect/mock-archive-001.log
+++ b/test/expect/mock-archive-001.log
@@ -93,8 +93,8 @@ P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = [undef]
P00 DEBUG: Archive::Push::File::archivePushCheck=>: strArchiveId = 9.4-1, strChecksum = [undef], strCipherPass = [undef], strWarning = [undef]
P00 DEBUG: Storage::Posix::Driver->new(): bFileSync = <true>, bPathSync = <true>
P00 DEBUG: Storage::Local->new(): bAllowTemp = <true>, hRule = [undef], lBufferMax = 4194304, oDriver = [object], strCipherPassUser = [undef], strCipherType = [undef], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp
-P00 DEBUG: Storage::Local->hashSize(): xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
-P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
+P00 DEBUG: Storage::Local->hashSize(): bIgnoreMissing = <false>, xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
+P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = false, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
P00 DEBUG: Storage::Local->hashSize=>: lSize = 16777216, strHash = ceb021d9bb41f220511e413b095d2b0d89fec113
P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = ({rxyParam => ({iLevel => 3}), strClass => pgBackRest::Storage::Filter::Gzip}), strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
P00 DEBUG: Storage::Local->openWrite(): bAtomic = true, bPathCreate = true, lTimestamp = [undef], rhyFilter = [undef], strCipherPass = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = <REPO:ARCHIVE>/9.4-1/000000010000000100000001-ceb021d9bb41f220511e413b095d2b0d89fec113.gz
diff --git a/test/expect/mock-archive-002.log b/test/expect/mock-archive-002.log
index a6239ebb6..90340f991 100644
--- a/test/expect/mock-archive-002.log
+++ b/test/expect/mock-archive-002.log
@@ -87,8 +87,8 @@ P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol
P00 DEBUG: Archive::Push::File::archivePushCheck=>: strArchiveId = 9.4-1, strChecksum = [undef], strCipherPass = <redacted>, strWarning = [undef]
P00 DEBUG: Storage::Posix::Driver->new(): bFileSync = <true>, bPathSync = <true>
P00 DEBUG: Storage::Local->new(): bAllowTemp = <true>, hRule = [undef], lBufferMax = 4194304, oDriver = [object], strCipherPassUser = [undef], strCipherType = [undef], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp
-P00 DEBUG: Storage::Local->hashSize(): xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
-P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
+P00 DEBUG: Storage::Local->hashSize(): bIgnoreMissing = <false>, xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
+P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = false, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
P00 DEBUG: Storage::Local->hashSize=>: lSize = 16777216, strHash = ceb021d9bb41f220511e413b095d2b0d89fec113
P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = ({rxyParam => ({iLevel => 3}), strClass => pgBackRest::Storage::Filter::Gzip}), strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
P00 DEBUG: Protocol::Storage::Remote->openWrite(): rhParam = [hash], strFileExp = <REPO:ARCHIVE>/9.4-1/000000010000000100000001-ceb021d9bb41f220511e413b095d2b0d89fec113.gz
diff --git a/test/expect/mock-stanza-001.log b/test/expect/mock-stanza-001.log
index 4ea87ac08..223ef8a8f 100644
--- a/test/expect/mock-stanza-001.log
+++ b/test/expect/mock-stanza-001.log
@@ -209,8 +209,8 @@ P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = [undef]
P00 DEBUG: Archive::Push::File::archivePushCheck=>: strArchiveId = 9.3-1, strChecksum = [undef], strCipherPass = [undef], strWarning = [undef]
P00 DEBUG: Storage::Posix::Driver->new(): bFileSync = <true>, bPathSync = <true>
P00 DEBUG: Storage::Local->new(): bAllowTemp = <true>, hRule = [undef], lBufferMax = 4194304, oDriver = [object], strCipherPassUser = [undef], strCipherType = [undef], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp
-P00 DEBUG: Storage::Local->hashSize(): xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
-P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
+P00 DEBUG: Storage::Local->hashSize(): bIgnoreMissing = <false>, xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
+P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = false, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
P00 DEBUG: Storage::Local->hashSize=>: lSize = 16777216, strHash = 488ba4b8b98acc510bce86b8f16e3c1ed9886a29
P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = ({rxyParam => ({iLevel => 3}), strClass => pgBackRest::Storage::Filter::Gzip}), strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
P00 DEBUG: Storage::Local->openWrite(): bAtomic = true, bPathCreate = true, lTimestamp = [undef], rhyFilter = [undef], strCipherPass = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = <REPO:ARCHIVE>/9.3-1/000000010000000100000001-488ba4b8b98acc510bce86b8f16e3c1ed9886a29.gz
@@ -464,8 +464,8 @@ P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = [undef]
P00 DEBUG: Archive::Push::File::archivePushCheck=>: strArchiveId = 9.3-1, strChecksum = [undef], strCipherPass = [undef], strWarning = [undef]
P00 DEBUG: Storage::Posix::Driver->new(): bFileSync = <true>, bPathSync = <true>
P00 DEBUG: Storage::Local->new(): bAllowTemp = <true>, hRule = [undef], lBufferMax = 4194304, oDriver = [object], strCipherPassUser = [undef], strCipherType = [undef], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp
-P00 DEBUG: Storage::Local->hashSize(): xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
-P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
+P00 DEBUG: Storage::Local->hashSize(): bIgnoreMissing = <false>, xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
+P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = false, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
P00 DEBUG: Storage::Local->hashSize=>: lSize = 16777216, strHash = 488ba4b8b98acc510bce86b8f16e3c1ed9886a29
P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = ({rxyParam => ({iLevel => 3}), strClass => pgBackRest::Storage::Filter::Gzip}), strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
P00 DEBUG: Storage::Local->openWrite(): bAtomic = true, bPathCreate = true, lTimestamp = [undef], rhyFilter = [undef], strCipherPass = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = <REPO:ARCHIVE>/9.3-1/000000010000000100000002-488ba4b8b98acc510bce86b8f16e3c1ed9886a29.gz
diff --git a/test/expect/mock-stanza-002.log b/test/expect/mock-stanza-002.log
index 1092482ec..6447feba6 100644
--- a/test/expect/mock-stanza-002.log
+++ b/test/expect/mock-stanza-002.log
@@ -223,8 +223,8 @@ P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol
P00 DEBUG: Archive::Push::File::archivePushCheck=>: strArchiveId = 9.3-1, strChecksum = [undef], strCipherPass = <redacted>, strWarning = [undef]
P00 DEBUG: Storage::Posix::Driver->new(): bFileSync = <true>, bPathSync = <true>
P00 DEBUG: Storage::Local->new(): bAllowTemp = <true>, hRule = [undef], lBufferMax = 4194304, oDriver = [object], strCipherPassUser = [undef], strCipherType = [undef], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp
-P00 DEBUG: Storage::Local->hashSize(): xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
-P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
+P00 DEBUG: Storage::Local->hashSize(): bIgnoreMissing = <false>, xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
+P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = false, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
P00 DEBUG: Storage::Local->hashSize=>: lSize = 16777216, strHash = 488ba4b8b98acc510bce86b8f16e3c1ed9886a29
P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = ({rxyParam => ({iLevel => 3}), strClass => pgBackRest::Storage::Filter::Gzip}), strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
P00 DEBUG: Protocol::Storage::Remote->openWrite(): rhParam = [hash], strFileExp = <REPO:ARCHIVE>/9.3-1/000000010000000100000001-488ba4b8b98acc510bce86b8f16e3c1ed9886a29.gz
@@ -322,8 +322,8 @@ P00 DEBUG: Protocol::Helper::protocolGet: found cached protocol
P00 DEBUG: Archive::Push::File::archivePushCheck=>: strArchiveId = 9.3-1, strChecksum = [undef], strCipherPass = <redacted>, strWarning = [undef]
P00 DEBUG: Storage::Posix::Driver->new(): bFileSync = <true>, bPathSync = <true>
P00 DEBUG: Storage::Local->new(): bAllowTemp = <true>, hRule = [undef], lBufferMax = 4194304, oDriver = [object], strCipherPassUser = [undef], strCipherType = [undef], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp
-P00 DEBUG: Storage::Local->hashSize(): xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
-P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
+P00 DEBUG: Storage::Local->hashSize(): bIgnoreMissing = <false>, xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
+P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = false, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
P00 DEBUG: Storage::Local->hashSize=>: lSize = 16777216, strHash = 488ba4b8b98acc510bce86b8f16e3c1ed9886a29
P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = ({rxyParam => ({iLevel => 3}), strClass => pgBackRest::Storage::Filter::Gzip}), strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
P00 DEBUG: Protocol::Storage::Remote->openWrite(): rhParam = [hash], strFileExp = <REPO:ARCHIVE>/9.3-1/000000010000000100000002-488ba4b8b98acc510bce86b8f16e3c1ed9886a29.gz
diff --git a/test/expect/mock-stanza-003.log b/test/expect/mock-stanza-003.log
index afb0ec9dd..e3f12a8b7 100644
--- a/test/expect/mock-stanza-003.log
+++ b/test/expect/mock-stanza-003.log
@@ -209,8 +209,8 @@ P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = [undef]
P00 DEBUG: Archive::Push::File::archivePushCheck=>: strArchiveId = 9.3-1, strChecksum = [undef], strCipherPass = [undef], strWarning = [undef]
P00 DEBUG: Storage::Posix::Driver->new(): bFileSync = <true>, bPathSync = <true>
P00 DEBUG: Storage::Local->new(): bAllowTemp = <true>, hRule = [undef], lBufferMax = 4194304, oDriver = [object], strCipherPassUser = [undef], strCipherType = [undef], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp
-P00 DEBUG: Storage::Local->hashSize(): xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
-P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
+P00 DEBUG: Storage::Local->hashSize(): bIgnoreMissing = <false>, xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
+P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = false, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
P00 DEBUG: Storage::Local->hashSize=>: lSize = 16777216, strHash = 488ba4b8b98acc510bce86b8f16e3c1ed9886a29
P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = ({rxyParam => ({iLevel => 3}), strClass => pgBackRest::Storage::Filter::Gzip}), strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
P00 DEBUG: Storage::Local->openWrite(): bAtomic = true, bPathCreate = true, lTimestamp = [undef], rhyFilter = [undef], strCipherPass = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = <REPO:ARCHIVE>/9.3-1/000000010000000100000001-488ba4b8b98acc510bce86b8f16e3c1ed9886a29.gz
@@ -439,8 +439,8 @@ P00 DEBUG: Archive::Common::walSegmentFind=>: strWalFileName = [undef]
P00 DEBUG: Archive::Push::File::archivePushCheck=>: strArchiveId = 9.3-1, strChecksum = [undef], strCipherPass = [undef], strWarning = [undef]
P00 DEBUG: Storage::Posix::Driver->new(): bFileSync = <true>, bPathSync = <true>
P00 DEBUG: Storage::Local->new(): bAllowTemp = <true>, hRule = [undef], lBufferMax = 4194304, oDriver = [object], strCipherPassUser = [undef], strCipherType = [undef], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strPathBase = [TEST_PATH]/db-master/db/base, strTempExtension = pgbackrest.tmp
-P00 DEBUG: Storage::Local->hashSize(): xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
-P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
+P00 DEBUG: Storage::Local->hashSize(): bIgnoreMissing = <false>, xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
+P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = false, rhyFilter = [undef], strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
P00 DEBUG: Storage::Local->hashSize=>: lSize = 16777216, strHash = 488ba4b8b98acc510bce86b8f16e3c1ed9886a29
P00 DEBUG: Storage::Local->openRead(): bIgnoreMissing = <false>, rhyFilter = ({rxyParam => ({iLevel => 3}), strClass => pgBackRest::Storage::Filter::Gzip}), strCipherPass = [undef], xFileExp = [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
P00 DEBUG: Storage::Local->openWrite(): bAtomic = true, bPathCreate = true, lTimestamp = [undef], rhyFilter = [undef], strCipherPass = [undef], strGroup = [undef], strMode = <0640>, strUser = [undef], xFileExp = <REPO:ARCHIVE>/9.3-1/000000010000000100000002-488ba4b8b98acc510bce86b8f16e3c1ed9886a29.gz
diff --git a/test/lib/pgBackRestTest/Module/Storage/StorageLocalPerlTest.pm b/test/lib/pgBackRestTest/Module/Storage/StorageLocalPerlTest.pm
index a524fc179..c8f8a93e3 100644
--- a/test/lib/pgBackRestTest/Module/Storage/StorageLocalPerlTest.pm
+++ b/test/lib/pgBackRestTest/Module/Storage/StorageLocalPerlTest.pm
@@ -283,6 +283,9 @@ sub run
$self->testResult(
sub {$self->storageLocal()->hashSize($strFile)},
qw{(} . cryptoHashOne('sha1', $strFileContent) . ', ' . $iFileSize . qw{)}, ' check hash/size');
+ $self->testResult(
+ sub {$self->storageLocal()->hashSize(BOGUS, {bIgnoreMissing => true})}, "([undef], [undef])",
+ ' check missing hash/size');
}
################################################################################################################################
[parent: 052e483057e4]