1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Move retrieval of archiveResult before while loop in verifyArchive().

The result structure for the archive id being processed only needs to be retrieved once so moving it outside of the WAL path list processing loop is more efficient.
This commit is contained in:
Cynthia Shang 2020-11-18 18:19:49 -05:00 committed by GitHub
parent 62d9f23961
commit 9aacd3c54a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -499,13 +499,13 @@ verifyArchive(void *data)
// If there are WAL paths then get the file lists
if (strLstSize(jobData->walPathList) > 0)
{
// Get the archive id info for the current (last) archive id being processed
VerifyArchiveResult *archiveResult = lstGetLast(jobData->archiveIdResultList);
do
{
String *walPath = strLstGet(jobData->walPathList, 0);
// Get the archive id info for the current (last) archive id being processed
VerifyArchiveResult *archiveResult = lstGetLast(jobData->archiveIdResultList);
// Get the WAL files for the first item in the WAL paths list and initialize WAL info and ranges
if (strLstSize(jobData->walFileList) == 0)
{