-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: In preparation for using `thd->ac_node->ac_info` for connection accounting, this change refactors most of the logic of `set_session_db_helper()` into the class `Ac_switch_guard`. The main motivation is that connection accounting first obtains connection for the new db, and if successful, releases connection for the old db. So the existing `ac_info` needs to be saved, and either released at the end if the db switch is successful, or put back info `ac_node` and the new one released if switch failed. Reviewed By: lth Differential Revision: D24319962 fbshipit-source-id: 80dca3a0b71
- Loading branch information
1 parent
4220ef5
commit a4406f7
Showing
3 changed files
with
55 additions
and
43 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