-
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.
[#24000] DocDB: Shutting down shared exchange could cause TServer to …
…hang Summary: When shared exchange should finish, we set state to Shutdown and notify exchange about it. But it could happen that concurrent thread could overwrite state, so shutdown will be missing. To avoid that, changed all state transfers except Shutdown to use compare_exchange_strong. Also PgClient session is destroyed while holding common mutex on all sessions. Since session also tried to destroy shared exchange, it could hang holding this mutex. To avoid total TServer hang on issues with destroying exchange - moved session destroy out of this mutex. Also set pg_client_use_shared_memory to false by default on Mac. Since Mac semaphore implementation is pretty slow (single round trip takes 10ms), and initdb takes 200s+. Jira: DB-12888 Test Plan: Jenkins Reviewers: rthallam, esheng Reviewed By: esheng Subscribers: ybase, yql Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D38207
- Loading branch information
Showing
3 changed files
with
52 additions
and
24 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