1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00

Add remote locks for stanza commands missed in 31c7824a.

31c7824a should have added remote locks when the commands were modified to run remotely. This is unlikely to have caused issues since these commands are generally not run concurrently with backup/expire but having the locks is safer.
This commit is contained in:
David Steele 2024-06-21 13:29:17 +08:00
parent b9a9ef2d5f
commit cfb8aa202e
3 changed files with 10 additions and 1 deletions

View File

@ -30,7 +30,10 @@
<release-development-list> <release-development-list>
<release-item> <release-item>
<commit subject="Refactor lock module.">
<github-pull-request id="2371"/> <github-pull-request id="2371"/>
</commit>
<commit subject="Add remote locks for stanza commands missed in 31c7824a."/>
<release-item-contributor-list> <release-item-contributor-list>
<release-item-contributor id="david.steele"/> <release-item-contributor id="david.steele"/>

View File

@ -143,18 +143,21 @@ command:
stanza-create: stanza-create:
command-role: command-role:
remote: {} remote: {}
lock-remote-required: true
lock-required: true lock-required: true
lock-type: all lock-type: all
stanza-delete: stanza-delete:
command-role: command-role:
remote: {} remote: {}
lock-remote-required: true
lock-required: true lock-required: true
lock-type: all lock-type: all
stanza-upgrade: stanza-upgrade:
command-role: command-role:
remote: {} remote: {}
lock-remote-required: true
lock-required: true lock-required: true
lock-type: all lock-type: all

View File

@ -595,6 +595,7 @@ static const ParseRuleCommand parseRuleCommand[CFG_COMMAND_TOTAL] =
( // cmd/stanza-create ( // cmd/stanza-create
PARSE_RULE_COMMAND_NAME("stanza-create"), // cmd/stanza-create PARSE_RULE_COMMAND_NAME("stanza-create"), // cmd/stanza-create
PARSE_RULE_COMMAND_LOCK_REQUIRED(true), // cmd/stanza-create PARSE_RULE_COMMAND_LOCK_REQUIRED(true), // cmd/stanza-create
PARSE_RULE_COMMAND_LOCK_REMOTE_REQUIRED(true), // cmd/stanza-create
PARSE_RULE_COMMAND_LOCK_TYPE(lockTypeAll), // cmd/stanza-create PARSE_RULE_COMMAND_LOCK_TYPE(lockTypeAll), // cmd/stanza-create
PARSE_RULE_COMMAND_LOG_FILE(true), // cmd/stanza-create PARSE_RULE_COMMAND_LOG_FILE(true), // cmd/stanza-create
PARSE_RULE_COMMAND_LOG_LEVEL_DEFAULT(logLevelInfo), // cmd/stanza-create PARSE_RULE_COMMAND_LOG_LEVEL_DEFAULT(logLevelInfo), // cmd/stanza-create
@ -610,6 +611,7 @@ static const ParseRuleCommand parseRuleCommand[CFG_COMMAND_TOTAL] =
( // cmd/stanza-delete ( // cmd/stanza-delete
PARSE_RULE_COMMAND_NAME("stanza-delete"), // cmd/stanza-delete PARSE_RULE_COMMAND_NAME("stanza-delete"), // cmd/stanza-delete
PARSE_RULE_COMMAND_LOCK_REQUIRED(true), // cmd/stanza-delete PARSE_RULE_COMMAND_LOCK_REQUIRED(true), // cmd/stanza-delete
PARSE_RULE_COMMAND_LOCK_REMOTE_REQUIRED(true), // cmd/stanza-delete
PARSE_RULE_COMMAND_LOCK_TYPE(lockTypeAll), // cmd/stanza-delete PARSE_RULE_COMMAND_LOCK_TYPE(lockTypeAll), // cmd/stanza-delete
PARSE_RULE_COMMAND_LOG_FILE(true), // cmd/stanza-delete PARSE_RULE_COMMAND_LOG_FILE(true), // cmd/stanza-delete
PARSE_RULE_COMMAND_LOG_LEVEL_DEFAULT(logLevelInfo), // cmd/stanza-delete PARSE_RULE_COMMAND_LOG_LEVEL_DEFAULT(logLevelInfo), // cmd/stanza-delete
@ -625,6 +627,7 @@ static const ParseRuleCommand parseRuleCommand[CFG_COMMAND_TOTAL] =
( // cmd/stanza-upgrade ( // cmd/stanza-upgrade
PARSE_RULE_COMMAND_NAME("stanza-upgrade"), // cmd/stanza-upgrade PARSE_RULE_COMMAND_NAME("stanza-upgrade"), // cmd/stanza-upgrade
PARSE_RULE_COMMAND_LOCK_REQUIRED(true), // cmd/stanza-upgrade PARSE_RULE_COMMAND_LOCK_REQUIRED(true), // cmd/stanza-upgrade
PARSE_RULE_COMMAND_LOCK_REMOTE_REQUIRED(true), // cmd/stanza-upgrade
PARSE_RULE_COMMAND_LOCK_TYPE(lockTypeAll), // cmd/stanza-upgrade PARSE_RULE_COMMAND_LOCK_TYPE(lockTypeAll), // cmd/stanza-upgrade
PARSE_RULE_COMMAND_LOG_FILE(true), // cmd/stanza-upgrade PARSE_RULE_COMMAND_LOG_FILE(true), // cmd/stanza-upgrade
PARSE_RULE_COMMAND_LOG_LEVEL_DEFAULT(logLevelInfo), // cmd/stanza-upgrade PARSE_RULE_COMMAND_LOG_LEVEL_DEFAULT(logLevelInfo), // cmd/stanza-upgrade