pgBackRest 2.36 (upcoming) commit log

Update command/stanza test to use standard patterns.

commit   : 03021c6a17f1374e84ef42614fa1dd2a6be4b64d    
  
author   : Cynthia Shang <cynthia.shang@crunchydata.com>    
date     : Mon, 14 Jun 2021 13:28:27 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 14 Jun 2021 13:28:27 -0400    

Click here for diff

No core code changes; only changes for stanza-create, stanza-upgrade, and stanza-delete command unit tests.  

M doc/xml/release.xml
M test/src/module/command/stanzaTest.c

Ignore mismatched close requests in the pq shim during error processing.

commit   : 80d63a5e8bc6e5e6d6e4d75b349a44f2aac70954    
  
author   : David Steele <david@pgmasters.net>    
date     : Sat, 12 Jun 2021 18:00:59 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Sat, 12 Jun 2021 18:00:59 -0400    

Click here for diff

M test/src/common/harnessPq.c

Improve error handling in db test module.

commit   : fba043717935babe084ebd8e9e1b7352dc9ff679    
  
author   : David Steele <david@pgmasters.net>    
date     : Sat, 12 Jun 2021 17:48:35 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Sat, 12 Jun 2021 17:48:35 -0400    

Click here for diff

Errors could cause segfaults since server objects were freed immediately but client destructors were run much later.  

M test/src/module/db/dbTest.c

Update pg-path options in db test module to be valid.

commit   : 0a65e59b5591718e46a4c331fa5301c41d49155d    
  
author   : David Steele <david@pgmasters.net>    
date     : Fri, 11 Jun 2021 19:16:25 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Fri, 11 Jun 2021 19:16:25 -0400    

Click here for diff

This allows files to be saved in the paths, which would have failed when they were invalid.  

M test/src/module/db/dbTest.c

Add mode, Pack, and StringId to the Pack type.

commit   : 97155bad860010514f06d651ef8103355b346ab8    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 10 Jun 2021 12:40:55 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 10 Jun 2021 12:40:55 -0400    

Click here for diff

Add StringList, which is not a primitive type but rather an array of String types.  
  
Also update pckWriteToLog() to work after pckWriteEnd(), i.e. this->tagStackTop is NULL.  

M src/common/type/pack.c
M src/common/type/pack.h
M test/src/common/harnessPack.c
M test/src/module/common/typePackTest.c

Add pckReadMove() and pckWriteMove().

commit   : 85a55bd40181bad943e224619fc936b046b2c8c1    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 10 Jun 2021 09:25:57 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 10 Jun 2021 09:25:57 -0400    

Click here for diff

Move a PackRead or PackWrite object to a new mem context.  
  
Also note that these functions may not work as expected with pack objects created by pckReadNewBuf() and pckWriteNewBuf() since the pack object does not have ownership of the passed buffer and cannot move it.  

M src/common/type/pack.c
M src/common/type/pack.h
M test/src/module/common/typePackTest.c

Skip sleep in sleepMSec() when sleep time is zero.

commit   : 788f7c1f30408b6eb3148cb288b67838e6cb718b    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 10 Jun 2021 09:24:42 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 10 Jun 2021 09:24:42 -0400    

Click here for diff

There is no point in sleeping when there is no sleep time.  
  
The advantage is that callers do not need to perform the check themselves.  

M src/common/time.c
M test/src/module/common/timeTest.c

Add error test harness/shim.

commit   : 5e1a8e6895ec59005a3974ac63ecbbc6832d5244    
  
author   : David Steele <david@pgmasters.net>    
date     : Thu, 10 Jun 2021 09:21:15 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Thu, 10 Jun 2021 09:21:15 -0400    

Click here for diff

The hrnErrorThrowP() macro allows errors with specified fields to be generated, which simplifies testing.  
  
Update the common/exit test to use the new macro.  

M test/define.yaml
A test/src/common/harnessError.c
A test/src/common/harnessError.h
M test/src/module/common/exitTest.c

Add HRN_STORAGE_MOVE() macro.

commit   : c5897007c4cb420c1e4111c9f9c14e1e706ec5e9    
  
author   : Cynthia Shang <cynthia.shang@crunchydata.com>    
date     : Wed, 9 Jun 2021 12:41:23 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Wed, 9 Jun 2021 12:41:23 -0400    

Click here for diff

Update command/expire test to show how it is used.  

M test/src/common/harnessStorage.c
M test/src/common/harnessStorage.h
M test/src/module/command/expireTest.c

Use lower-case names from Azure identifiers in integration tests.

commit   : 15dfbf4c1d2fd33daa1a89a644683e80eeae4194    
  
author   : David Steele <david@pgmasters.net>    
date     : Wed, 9 Jun 2021 12:28:40 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Wed, 9 Jun 2021 12:28:40 -0400    

Click here for diff

Azurite, which is used for testing, did not enforce this before so the capital letters were not a problem. Now Azurite enforces the same rules as Azure so use lower-case identifiers instead.  
  
These names were only used in integration tests so there was no production impact.  

M test/expect/mock-archive-stop-002.log
M test/expect/mock-stanza-002.log
M test/lib/pgBackRestTest/Env/Host/HostAzureTest.pm

Add optional remove to TEST_STORAGE_EXISTS().

commit   : c6a8528e3158de3e4ccdba00c7af6d47cc28d073    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 8 Jun 2021 14:51:23 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 8 Jun 2021 14:51:23 -0400    

Click here for diff

This allows TEST_STORAGE_EXISTS() to be used in most cases where TEST_STORAGE_REMOVE() was used before.  
  
Rename TEST_STORAGE_REMOVE() to HRN_STORAGE_REMOVE() now that is is no longer used as a test. Still allow an error when the file is missing just to help keep tests tidy.  

M test/src/common/harnessStorage.c
M test/src/common/harnessStorage.h
M test/src/module/command/archiveGetTest.c
M test/src/module/command/archivePushTest.c
M test/src/module/command/backupTest.c
M test/src/module/command/expireTest.c

Add support for more Pack types.

commit   : 4a075b725287aafe12bb2add89ae4b224dafe2bc    
  
author   : David Steele <dwsteele@users.noreply.github.com>    
date     : Tue, 8 Jun 2021 12:55:00 -0400    
  
committer: GitHub <noreply@github.com>    
date     : Tue, 8 Jun 2021 12:55:00 -0400    

Click here for diff

Since the pack type was stored in 4 bits, only 15 values were allowed (0 was reserved).
  

  
Allow virtually unlimited types by storing type info in a base-128 encoded integer following the tag when the type bits in the tag are set to 0xF.
  

  
Also separate the type IDs used in the pack (PackTypeMap) from those presented to the user (PackType). The prior PackType enum exposed implementation details to the user, e.g. pckTypeUnknown.

M build/lib/pgBackRestBuild/Config/BuildHelp.pm
M doc/xml/release.xml
M src/command/help/help.auto.c
M src/common/type/pack.c
M src/common/type/pack.h
M test/src/common/harnessPack.c
M test/src/module/common/typePackTest.c

Update command/expire test to use standard patterns.

commit   : 3f9fbc3c24eab48e7ae2871484ea01273049e601    
  
author   : Cynthia Shang <cynthia.shang@crunchydata.com>    
date     : Tue, 8 Jun 2021 11:00:28 -0400    
  
committer: GitHub <noreply@github.com>    
date     : Tue, 8 Jun 2021 11:00:28 -0400    

Click here for diff

The way tests are written has evolved over time. Update the command/expire test to use the new test patterns.

M doc/xml/release.xml
M test/src/module/command/expireTest.c

Fix comments.

commit   : 12f81f8933b31d528a04b3640f407c9ff7ce9c45    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 8 Jun 2021 09:56:24 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 8 Jun 2021 09:56:24 -0400    

Click here for diff

The extern'd function should not have duplicated the comment in the header. The static helper needed a comment.  

M src/db/helper.c

Rename param structs to match function names.

commit   : 4ccb42bb7a84d17bd708b1a4c117037738ef1f6f    
  
author   : David Steele <david@pgmasters.net>    
date     : Tue, 8 Jun 2021 08:44:10 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Tue, 8 Jun 2021 08:44:10 -0400    

Click here for diff

The functions were named with short integer representations (e.g. I32) but the param structs were using longer ones, e.g. UInt32. Shorten the integer representations in the param structs to match.  
  
Also rename pckReadUInt64Internal() to pckReadU64Internal() for the same reason.  

M src/common/type/pack.c
M src/common/type/pack.h
M test/src/module/common/typePackTest.c

Switch order of remote startup in storage/remote test.

commit   : df8276f59f4271a80bcf4f0ca13089864d9b95cb    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 11:53:25 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 11:53:25 -0400    

Click here for diff

The pg storage must be started before the repo storage to set the max remotes allowed to 2. The protocol helper expects all remotes to have the same type so we are cheating here a bit, but without this ordering the second remote will never be sent an explicit exit and may not save coverage data.  

M test/src/module/storage/remoteTest.c

Remove parse.auto.h.

commit   : a76cb57c80026e713886bc3205e9ef60fd1e4070    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 08:48:09 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 08:48:09 -0400    

Click here for diff

At one time there was a lot more in this header but it got merged with the enums and constants in config.auto.c, leaving only the ConfigOptionType enum.  
  
Auto-generating the ConfigOptionType enum is not very useful since new option types require code in parse.c.  

M build/lib/pgBackRestBuild/Config/BuildParse.pm
M src/config/config.intern.h
D src/config/parse.auto.h
M src/config/parse.h

Remove unused command string constants.

commit   : 7a449f0e49df4c03bad8a2c468a3fd5adb1e5732    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 08:18:02 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 08:18:02 -0400    

Click here for diff

M build/lib/pgBackRestBuild/Config/Build.pm
M src/config/config.auto.c
M src/config/config.auto.h

Handle NULL VariantList in JSON.

commit   : a607750be1775fa9f74164f8d3768536b86387f6    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 07:46:51 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 07:46:51 -0400    

Click here for diff

This worked if the Variant was NULL but not if the Variant contained a NULL.  

M src/common/type/json.c
M test/src/module/common/typeJsonTest.c

Update config.guess and config.sub to latest versions.

commit   : aaca4df983e280f8b2357ba923496f4618c72713    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 07:36:56 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 07:36:56 -0400    

Click here for diff

M src/build/config.guess
M src/build/config.sub

Begin v2.35 development.

commit   : a7b1d2b9d00014172edd963229ca4d40a3855da7    
  
author   : David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 07:32:34 -0400    
  
committer: David Steele <david@pgmasters.net>    
date     : Mon, 7 Jun 2021 07:32:34 -0400    

Click here for diff

M doc/resource/git-history.cache
M doc/xml/release.xml
M src/build/configure.ac
M src/configure
M src/version.h