-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#24713] docdb: PG Integration with the DocDB advisory lock functiona…
…lity Summary: This diff adds PG integration with the DocDB advisory lock functionality. Only transaction level locks are supported. When PG flag `ysql_yb_enable_advisory_lock` has been set to true, user can use transaction level advisory locks. ``` void pg_advisory_xact_lock(key bigint) void pg_advisory_xact_lock(key1 int, key2 int) void pg_advisory_xact_lock_shared(key bigint) void pg_advisory_xact_lock_shared(key1 int, key2 int) boolean pg_try_advisory_xact_lock(key bigint) boolean pg_try_advisory_xact_lock(key1 int, key2 int) boolean pg_try_advisory_xact_lock_shared(key bigint) boolean pg_try_advisory_xact_lock_shared(key1 int, key2 int) ``` If session level advisory lock functions are called, it will raise an error from pg_client_session layer. ``` ERROR: session-level advisory locks are not yet implemented ``` In this diff, also abandoned the gflag `yb_enable_advisory_lock`, introduced a new preview PG gflag `ysql_yb_enable_advisory_locks` to guard this feature instead. To enable this feature when starting a cluster, should set the following gflags on both master and tserver: `ysql_yb_enable_advisory_locks=true,allowed_preview_flags_csv=ysql_yb_enable_advisory_locks` **Upgrade/Rollback safety:** The advisory lock feature is guarded by ysql_yb_enable_advisory_lock (false by default). Jira: DB-13789 Test Plan: Jenkins: urgent advisory_lock-test pg_advisory_lock-test org.yb.pgsql.TestPgRegressIsolationWithoutWaitQueues#testPgRegress org.yb.pgsql.TestPgRegressIsolation#testPgRegress Reviewers: pjain, hsunder, bkolagani, yyan Reviewed By: pjain, hsunder, bkolagani Subscribers: svc_phabricator, ybase, yql Differential Revision: https://phorge.dev.yugabyte.com/D40617
- Loading branch information
1 parent
7497dd7
commit 8ce8475
Showing
33 changed files
with
1,136 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.