-
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.
[#17134] ysql: CREATE INDEX add timeout on wait for backends
Summary: As of commit a1729c3 titled [#7376] ysql: fix state waits for online CREATE INDEX CREATE INDEX may wait indefinitely on backends to catch up. It is easy to not know what is taking the CREATE INDEX so long. In a situation where the CREATE INDEX DDL contends with DMLs, some options are A. have CREATE INDEX wait indefinitely until the old DMLs finish B. have CREATE INDEX die after timeout C. have CREATE INDEX wound the old DMLs Change the default behavior from A to B, where timeout is five minutes (hopefully, that is enough time for transactions to finish). Let the timeout be configurable using per-session GUC variable yb_wait_for_backends_catalog_version_timeout and corresponding PG flag ysql_yb_wait_for_backends_catalog_version_timeout. To get the old A behavior, set the value to zero or negative, which is interpreted as no timeout. The benefit of timing out the CREATE INDEX is that it gives a chance to return an error message with details about what is going on. Close: #17134 Jira Issue(s): DB-6416 Test Plan: ./yb_build.sh fastdebug --gcc11 \ --cxx-test pgwrapper_pg_backends-test \ --gtest_filter PgBackendsTest.PgTimeout Reviewers: hbhanawat, sshaikh, myang Reviewed By: myang Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D24932
- Loading branch information
Showing
6 changed files
with
99 additions
and
0 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
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