You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-09 00:45:49 +02:00
Allow multiple remote locks from the same main process.
Improve locking on remote processes by introducing an exec-id that is unique to the main process and passed to all remote processes. This allows the remote processes to determine if a lock is held by a remote from the same main process. If so, the lock is allowed. The exec-id is also useful for associating remote logs with main logs for debugging purposes.
This commit is contained in:
@ -223,8 +223,8 @@ testRun(void)
|
||||
HARNESS_FORK_CHILD_BEGIN(0, false)
|
||||
{
|
||||
TEST_RESULT_INT_NE(
|
||||
lockAcquire(cfgOptionStr(cfgOptLockPath), strNew("stanza1"), lockTypeBackup, 0, true), -1,
|
||||
"create backup/expire lock");
|
||||
lockAcquire(cfgOptionStr(cfgOptLockPath), strNew("stanza1"), STRDEF("999-ffffffff"), lockTypeBackup, 0, true),
|
||||
-1, "create backup/expire lock");
|
||||
|
||||
sleepMSec(1000);
|
||||
lockRelease(true);
|
||||
@ -476,8 +476,8 @@ testRun(void)
|
||||
HARNESS_FORK_CHILD_BEGIN(0, false)
|
||||
{
|
||||
TEST_RESULT_INT_NE(
|
||||
lockAcquire(cfgOptionStr(cfgOptLockPath), strNew("stanza1"), lockTypeBackup, 0, true), -1,
|
||||
"create backup/expire lock");
|
||||
lockAcquire(cfgOptionStr(cfgOptLockPath), strNew("stanza1"), STRDEF("777-afafafaf"), lockTypeBackup, 0, true),
|
||||
-1, "create backup/expire lock");
|
||||
|
||||
sleepMSec(1000);
|
||||
lockRelease(true);
|
||||
|
Reference in New Issue
Block a user